Documentation 自动代码文档| PHP的一个问题

Documentation 自动代码文档| PHP的一个问题,documentation,phpdoc,documentation-generation,phpdocumentor2,phpdocx,Documentation,Phpdoc,Documentation Generation,Phpdocumentor2,Phpdocx,我有一个CodeIgniter项目,里面有很多模块和代码 现在我想为其他新同事创建文档 比如说 /** * inline tags demonstration * * This class generates bars using the main algorithm, which also * works heavily with {@link foo()} to rule the world. If I want * to use the characters "{@link"

我有一个CodeIgniter项目,里面有很多模块和代码

现在我想为其他新同事创建文档

比如说

/**
 * inline tags demonstration
 *
 * This class generates bars using the main algorithm, which also 
 * works heavily with {@link foo()} to rule the world. If I want
 * to use the characters "{@link" in a docblock, I just use "{@}link."  If
 * I want the characters "{@*}" I use "{@}*}"
 *
 * @author ahobbit
 * @copyright middleearth.org XVII
 * @version 1.2.3
 */
class bar
{
    // beginning of docblock template area
    /**#@+
    * @access private
    * @var string
    */
    var $_var1 = 'hello';
    var $_var2 = 'my';
    var $_var3 = 'name';
    var $_var4 = 'is';
    var $_var5 = 'Bob';
    var $_var6 = 'and';
    var $_var7 = 'I';
    /**
    * Two words
    */
    var $_var8 = 'like strings';
    /**#@-*/
    var $publicvar = 'Lookee me!';
}

/**
 * Makes chocolate bars
 *
 * There are two aspects to this class.
 * {@inheritdoc }  In addition, the foo class
 * makes the bars chocolate
 */
class foo extends bar
{

    /**
    * Check if a Sql row exists. (with two values)
    *
    * This function will check if a selected sql row exists that contains two
    * known values.
    *
    * @param  string  $tblname  Sql Table Name
    * @param  string  $colname  Sql Column Name 1
    * @param  string  $value    Sql value 1
    * @param  string  $colname2 Sql Column Name 2
    * @param  string  $value2   Sql value 2
    * @return boolean           returns true if the sql row does exist
    */
    function tableHasRow2D($tblname, $colname, $value, $colname2, $value2) { 
        $row = sqlQuery("SELECT COUNT(*) AS count FROM $tblname WHERE " . "$colname 
            LIKE '$value' AND $colname2 LIKE '$value2'"); 
        return $row['count'] ? true : false; 
    } 
}
我使用了以下命令

I.


II


是否可以在生成代码之前或之后向模块添加注释? 因为我希望在文档本身的特定模块中添加注释,并且可以选择这样做 自动插入到源代码的正确位置

我应该如何管理项目中的模块和代码,以及如何创建可浏览的HTML文档


任何其他可以直接从PHP源代码生成文档的工具,这在建议中都是很好的

您写的“我已经使用了以下命令”,但我没有看到任何文档命令(或者更准确地说,显示了一小段带有所需文档的代码)。你看过doxygen了吗(它也有一些php功能)。我看到了你的代码,我可以从中生成doxygen文档。你能告诉我们在Response post@albertI中构建所有源代码需要遵循的命令吗?我刚刚把提供的代码放在一个php文件中(包括结尾处的
。创建了默认的doxygen配置文件
Doxfile
doxygen-g
)并运行了doxygen(
doxygen
)。另请参阅
E:\xampp\htdocs\CI_Proj> php phpDocumentor.phar -d application

PHP Warning:  count(): Parameter must be an array or an object that implements Countable in phar://E:/xampp/htdocs/CI_Proj/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293
  Execute transformation using writer "twig"
  Execute transformation using writer "twig"
  Execute transformation using writer "twig"
  Execute transformation using writer "twig"
  Execute transformation using writer "twig"
  Execute transformation using writer "Graph"
Unable to find the `dot` command of the GraphViz package. Is GraphViz correctly installed and present in your path? 222.041s
Analyze results and write a report to log 

                       ..    0.004s
E:\xampp\htdocs\CI_Proj\vendor\bin>apigen generate src "E:\xampp\htdocs\CI_Proj\application" --destination "E:\xampp\htdocs\CI_Proj\docs-apigen" --debug

Fatal error: Cannot use 'Object' as class name as it is reserved in E:\xampp\htdocs\CI_Proj\vendor\latte\latte\src\Latte\Object.php on line 14
ErrorException: Cannot use 'Object' as class name as it is reserved in E:\xampp\htdocs\CI_Proj\vendor\latte\latte\src\Latte\Object.php:14
Stack trace:
#0 [internal function]: Tracy\Debugger::shutdownHandler()
#1 {main}
Unable to log error: Logging directory is not specified.