So the below description will give you a step-by-step to run phpDocumentor (which replaces phpDoc):
Get it at www.phpdoc.org or install it via PEAR (much easier – 2MB download or so).
For Windows machines:
- go-pear.bat (if you haven’t already — find it if you don’t know where it is) and pear install --alldeps phpdocumentor
- Do a search for PEAR_ENV.reg on your machine.
- Execute it.
- Make sure you’ve got the Environment Variables set to point to include the PHP bin directory (
set PATH=%PATH%;c:\path\to\php ) OR- From the desktop, right-click My Computer and click properties.
- In the System Properties window, click on the Advanced tab.
- In the Advanced section, click the Environment Variables button.
- Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.
- In Vista:
- Open the the Control Panel, select the System and Maintenance link, and select the System link. Or, press the Windows key and the Pause / Break key at the same time.
- Select the Advanced System settings link.
- You can now call php and pear commands from the command line (you many need to restart for the changes to come into effect).
- Verify by typing phpdoc -h
phpdoc -d "c:\projectDir" -o HTML:default:default -t "c:\projectDir\docs"- for PDF files, replace the output parameter (-o): -o PDF:default:default
- Formatting in smarty (like PHP website etc): -o HTML:smarty:default
-t = target directory of generated documents
-d = source directory of files to check
-o output format as above.
(more…)