In any project development life cycle, documentation plays a key role. The advantages for the same are quite obvious.
In a big team it plays a crucial role. The reason for the same is if a developer has spent many days in creating a piece of code which has to be reused by other team members. If the documentation for the code is done in a proper way, other team members can simply refer to it and doesn’t have to seek much help from the developer who has developed it. Hence it is the responsibility of the developer to provide good documentation for it.
In java the above is achieved using Javadoc. PHP also has come up with a command line tool called PHP Documentor on the same line of Java doc.
Netbeans has provided a plugin to PHPDocumentor in there latest release Netbeans 7.0.
Installation of PHPDocumentor and integration with Netbeans
- Netbeans 7.0 should be installed
- PEAR should be installed
- Run the command PEAR install –alldeps phpdocumentor
- The above command will install PHP Documentor along with all the dependencies
Integration with Netbeans
- Open Netbeans
- Go to Tools->Options->Phpdoc and verify that it is identifying the PHPDocumentor installation. Please refer to the image given below
- Right click on the project, select Generate PhpDoc
- Enter the target directory where you would like to store the documentation and click Ok
- Verify the output window
- Once documentation generation is done, default browser would open with the index page for the documentation
Ushainformatique Development Team