Advanced Documentation With Reflection In PHP 5
Summary
In summary, using Reflection, SPL and phpdoc commenting style you can create a dynamic in-memory site documentation system that does not require updating documentation. Rather, documentation can be simply generated on demand.
This will save you or your staff from having to spend a lot of time managing documentation releases and updates.
If used effectively, it guarantees that all the documentation is accurate for the version of the code you are running. This is especially useful in organizations that utilize CVS or SVN development as documentation can also be effectively versioned without extra management of branches and modules. In short, it solves a lot of the common workflow problems related to documentation.
For a working example of these concepts please see StormAPI from StormTide Digital Studios Inc at http://www.stormtide.ca/StormAPIMVC.
A native documentation generator can be located in /model/docgen of our trac source code browser.
I hope this article proves useful and if you are in need of professional PHP consulting please contact StormTide Digital Studios Inc..
Kevin McArthur is the CEO of StormTide Digital Studios Inc and has been working with PHP for over 6 years developing some of the most innovative scaled web-applications around.
References and resources
- Download a PDF version of this article
- View or post comments for this article
- Browse similar articles by tag: PHP, PhpDoc, Reflection
