如何从phpDocumentor的方法内部获取注释

时间:2015-03-13 20:10:26

标签: php phpdoc phpdocumentor2

我想知道是否可以使用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
}
}

1 个答案:

答案 0 :(得分:0)

根据文档,这些内联评论不会被phpDocumentor接收。

请点击此处查看您可以记录的内容列表:

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