【问题标题】:phpDocumentor Not workingphpDocumentor 不工作
【发布时间】:2012-05-30 11:54:25
【问题描述】:

我正在尝试开始使用 phpDocumentor。我的问题是它只生成一个 img,css,js 文件夹和一个 structure.xml 文件。

我目前在 c:/xampp/htdocs 中创建了一个名为 phpTest 的文件夹,其中包含 1 个文件 index.php 和一个类和一些 docBlox cmets

我已经使用 pear 和命令提示符安装了 phpDocumentor

所以我目前正在运行 cmd

键入 cd c:/xampp/htdocs/phptest

phpDocs -d c:/xampp/htdocs/phptest -t c:/xampp/htdocs/phptest/docs

docs 文件夹中的唯一输出是 3 个文件夹和 structure.xml 文件。是否应该有一个 index.hmtl 文件,其中包含所有可供我查看的文档?我如何让它显示出来?谢谢 这是我正在尝试使用 phpDocumentor 记录的测试 index.php 文件。

    <?php
/**
* File level docBlock
*@package Command
*/

/**
*This is the command class it is incharge
*Only has execute method
*@package Command
*@author Michael Booth
*@copyright 2012 bla bla
*/
abstract class Command{
/**
*keeps keys values
*@var array
*/
public var  $arrayvar = array();

/**
*executes method
*@param $int contains contextual data
*@return bool
*/
    abstract function execute($integer);
}

?>

【问题讨论】:

    标签: php phpdoc


    【解决方案1】:

    这可能是因为 PHP 会在您的文件中报告语法错误。线

    public var  $arrayvar = array();
    

    应该是

    public $arrayvar = array();
    

    var $arrayvar = array();
    

    【讨论】:

      【解决方案2】:

      请确保您的文档块以 slash-asterisk-asterisk 开头,而不是 slash-asterisk 的 PHP 常规注释语法。此外,请确保您在 docblock 中至少有一些标签(例如 @package MyPackage)。 phpDoc 不会看到常规的注释块,因此这本身可能就是没有生成任何内容的原因。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-06-17
        • 2012-06-05
        • 2011-05-14
        • 1970-01-01
        • 1970-01-01
        • 2014-06-14
        • 2011-07-31
        相关资源
        最近更新 更多