【问题标题】:How to get comment from inside a method with phpDocumentor如何使用 phpDocumentor 从方法内部获取评论
【发布时间】:2015-05-16 11:00:18
【问题描述】:

我想知道是否可以使用 phpDocumentor 从方法内部获取注释行。我不仅在方法块中注释,而且在它自身的方法内部也有很多注释。

class Test {

/**
 * Methdo to test if i get all the text back. 
 *
 * @return void
 */
public method getCommentFromMethod () {
    # Do something 
    $test = time();
    // dont forget to get this text to
    echo 'get the above comment';
    # How can i get this text also to phpDocumentor
}
}

【问题讨论】:

    标签: php phpdoc phpdocumentor2


    【解决方案1】:

    根据文档,这些内联 cmets 不会被 phpDocumentor 拾取。

    请参阅此处了解您可以记录的内容:

    http://www.phpdoc.org/docs/latest/getting-started/your-first-set-of-documentation.html#which-elements-can-be-documented

    【讨论】:

    猜你喜欢
    • 2013-11-02
    • 2014-03-23
    • 2013-04-22
    • 2021-07-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-19
    • 2017-05-29
    相关资源
    最近更新 更多