【发布时间】:2010-03-11 08:02:18
【问题描述】:
我想获取一个方法的cmets,以下面的方法为例:
/**
* Returns the regex to extract all inputs from a file.
* @param string The class name to search for.
* @return string The regex.
*/
public function method($param)
{
//...
}
结果应该是
Returns the regex to extract all inputs from a file.
@param string The class name to search for.
@return string The regex.
我找到的方法是使用像 file_get_content 这样的函数来获取文件内容 -> 过滤我想要的方法 -> 使用正则表达式获取评论
好像有点复杂,有什么方便的存档方法吗?
【问题讨论】: