Skip to content

Generating Documentation

preslav-anev edited this page May 19, 2017 · 10 revisions

If you want to generate documentation in stylized html-formatted style, covering all the classes, their methods and variables you can do that using phpDocumentor, which is already added for you in composer.json file.

  1. First you'll need to have Composer installed.
  2. Then run 'composer install' command in the root directory of the PHP-SDK, where the composer.json is located. This will create the vendor folder and in it you will have all of the packages listed in composer.json, currently phpDocumentor, phpunit with their respective versions.
  3. Once you have the phpDocumentor package added to the vendor folder you can start generating html documentation by executing the following command:
  phpdoc 
  //This will reference the **phpdoc.dist.xml** file in the root of the directory.  

If for some reason the command above doesn't work, you can do it manually by executing this command:

  vendor/bin/phpdoc -d src/ -t phpdocs/
  1. Once the command executes you can access the newly generated documentation by opening in a browser the index.html file found in path-to-phpsdk/sdkphp/phpdocs/index.html

Next Step

Clone this wiki locally