How do I create an automatic code documentation for a PHP project?

家住魔仙堡 提交于 2019-12-08 08:32:07

问题


I have a big project, that uses CakePHP. Now I would like to create a documentation for other new co-workers.

An idea was to use the existing PHPdoc comments and other comments inside the code to create an automatic documentation for a start.

  1. How can I manage such a big project and How would I create a browsable HTML-Documentation?

  2. How can I automatically add missing comments?
    (I use Eclipse for coding, but if it is easier in another editor I wouldn't mind.)
    There are many functions declared like this:

    # some explanation not in phpDoc
    function whatever() {
    ....
    }

It would be optimal if I could use an external Editor to edit only the phpdoc comments and they were automatically inserted in the sourcecode at the right positions.


回答1:


I am not sure how much this will fulfill your requirement.

But the NetBeans IDE will help you on documentation.

For documentation guide, you can refer the below site:

Here is a guide for documentation

Please suggest if you can find better.




回答2:


You can use ApiGenerator plugin. It's a Cake plugin that uses the same syntax as PhpDocumentor, and for generate the document you just have to run a shell command.

https://github.com/cakephp/api_generator



来源:https://stackoverflow.com/questions/21929399/how-do-i-create-an-automatic-code-documentation-for-a-php-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!