If you intend on using the phar distributed version, please read the following for some common phar issues: http://silex.sensiolabs.org/doc/usage.html#pitfalls.
You can use the phpdoc command to generate your documentation for you.
In this document is shown how phpDocumentor can be used to generate your documentation. It is expected that the phpdoc command is available; thus whenever we ask you to run a command it would be in the following form:
When you have installed a version via the installer you should invoke the phpdoc.php script in the bin folder of your phpDocumentor installation unless you have added a symlink as described in the chapter Installation.
Under Linux / MacOSX that would be:
And under Windows that would be:
phpDocumentor takes a two-step approach to generating documentation:
These steps can be executed at once or separate, depending upon your preference.
To generate your documentation you can invoke phpDocumentor without specifying a command:
When ran without parameters (as shown above) it will try to get the location of the source code and the target folder from a configuration file (which is discussed in the Configuration chapter) or exit with an error. You can use the help option (-h or --help) to view a list of all possible options.
$ phpdoc -h
The simplest action would be to invoke phpDocumentor to parse the given location (-d for a directory, -f for a file) and tell it to output your documentation to the given target (-t) folder using the following command:
$ phpdoc -d [SOURCE_PATH] -t [TARGET_PATH]
Please be aware that phpDocumentor expects the target location either exists or can be created with the current user. If it is not, the application will exit and tell you so.
phpDocumentor has a command oriented CLI; the first argument represents the name of the command to execute, if no name is given then phpDocumentor assumes you want to run the project:run command. This last mechanism provides backwards compatibility with phpDocumentor 1.x.
$ phpdoc -d . -t output
Would result in the project:run command being executed with parameter -d and -t.
$ phpdoc run -d . -t output
would have the same effect as the previous command; if no ‘namespace’ (thus _project:_) is provided then the namespace project is assumed.
$ phpdoc project:run -d . -t output
would have the same effect as the previous examples and is the most explicit form.
All commands are described below with a link to their full description. Each command has specific arguments. It is advised to either read the detailed sub-section or invoke phpdoc <command> --help; this will provide a summary of the command and its arguments.
|project:list||Lists all commands that can be run by phpDocumentor.|
|project:run||Parses and transform the given directory (-d|-f) to the given location (-t).|
|project:parse||Parses the given source code and creates an Intermediate Structure File.|
|project:transform||Transforms an existing Intermediate Structure File into the specified output format.|
|plugin:generate||Generates a skeleton plugin.|
|template:generate||Generates a skeleton template.|
|template:list||Displays a listing of all available templates in phpDocumentor.|
© Copyright 2011, Mike van Riel. Created using Sphinx 1.0.7.