문제

phpdoc can be configured either using a .xml file or an .ini file. The documentation is ambiguous, but it seems that using an .xml file is currently the preferred approach. Agree?

Where should I place the .xml file?

According to http://www.phpdoc.org/docs/latest/for-users/configuration.html...

The easiest solution would be to place the configuration file in the root of your project with the name: phpdoc.dist.xml.

Which directory do they refer to as "the root of your project"? I've tried everything i.e.

/usr/share/pear/phpDocumentor, 
/var/www/phpDocumentor,
 /var/www,

and nothing seems to work.

도움이 되었습니까?

해결책

the root of your project is where you put the code that you need to genereate the doc. example: you need to generate the doc for code inside /var/www/example directory, then the phpdoc.dist.xml. shoud be in it. It works just like composer and phpunit.

example again:

$ phpdoc -d ./src -t ./docs/api

phpdoc.dist.xml should bi in ./src

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top