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


How to get comment from inside a method with phpDocumentor

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

根据文档,phpDocumentor不会选择这些内联注释。

有关您可以记录的内容列表,请参阅此处:

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