澄清: 我使用Aptana / Eclipse并且想要打开任何php文件并生成现有代码的概述。因此,我可以快速确定代码尝试做什么以及如何从鸟瞰角度进行。
我试图找到现有的解决方案无济于事。我不希望编程,因为我认为这可以使用正确的插件或eclipse内置的本机功能组合来完成。我所拍摄的大纲将包括评论,功能以及有限的回报。
它看起来像下面这样:
/**
* This file creates an objet
*
* TODO: something
*/
//This function does something
function example();
//first it does this
//then it does this
//then show any returns if applicable
return function();
//This function does something else
function another_example();
return 'whatever';
要包括的其他回报将是:
return 'string';
return $variable;
不是整个数组,只知道它是一个数组就足够了。
return array();
return TRUE;
return FALSE;
return NULL;
Switch case返回如下:
switch
case 'a':
return ...;
case 'b':
return ...;
return '-';
答案 0 :(得分:1)
我建议您查看PHP Documentor,您需要稍微修改一下您的评论结构(here is the spec),但它会从您的代码中生成出色的文档。 Example
答案 1 :(得分:0)
您还可以使用Docco
之类的内容它在node.js上运行,但会生成漂亮的并排文档。