===== How to build your own PHP Manual format ===== ==== Requirements ==== * PHP Manual documentation sources * PHP 5.3+ * PhD ==== Step #1 : Download the PHP Manual DocBook sources ==== {{page>doc:articles:localdocsetup#checkout_the_php_documentation_from_svn&nofooter&noeditbtn}} ==== Step #2 : Install PhD ==== {{page>doc:articles:localdocsetup#install_phd&nofooter&noeditbtn}} ==== Step #3 : Install PhD_IDE ==== $ pear install phpdocs/PhD_IDE-beta ==== Step #4 : Use PhD to generate the appropriate files ==== The following commands will build the files used by PhD_IDE: $ cd /path/to/your/php/doc/checkout $ php doc-base/configure.php $ phd --docbook doc-base/.manual.xml --package IDE --format xml --format funclist You now have the following file structure: /path/to/your/php/doc/checkout/doc-base/output/index.sqlite /path/to/your/php/doc/checkout/doc-base/output/ide-xml/ /path/to/your/php/doc/checkout/doc-base/output/ide-funclist.txt Tip: The --output PhD option changes the output directory. ==== Step #5 : Build your own structure ==== === Json === The following commands use an example script called 'gen-ide.php', and this script requires you to edit its configuration. Namely, the path to your PhD and PHP Documentation checkouts. Edit this script to fit your needs. The following describes default usage: $ cp /path/to/your/php/doc/checkout/doc-base/scripts/gen-ide-json.php /tmp/test-ide.php $ cd /tmp $ vim test-ide.php $ ./test-ide.php $ open php_manual.json === SQLite 3 === $ phd --docbook path/to/.manual.xml --package IDE --format sqlite ==== Conclusion ==== The PhD_IDE PhD package allows customizing the output of the PHP Manual. It takes DocBook XML and converts it to a PHP object containing all (most) of the functions documentation. The main purpose is to allow IDE's to build syntax files for code insight and PHP documentation, but its usage is flexible.