2012-02-21 47 views
5

我遇到了PHP 5.3命名空间和Doxygen注释的问题。如何禁用Doxygen中的斜杠命令语法

例子:

/** 
* Sample Method 
* 
* @param string $output 
* @return \Project\Lib\Rest 
*/ 

Doxygen的给了我以下警告:

warning: Found unknown command `\Project' 
warning: Found unknown command `\Lib' 
warning: Found unknown command `\Rest' 

我能做些什么来解决这个或关闭\命令,并只使用@commands

回答

5

尝试逃脱反斜杠,即使用

/** 
* Sample Method 
* 
* @param string $output 
* @return \\Project\\Lib\\Rest 
*/ 

\\实际上是一个doxygen命令,它只打印一个反斜杠。

Documenting PHP with Doxygen: The Pros and Cons参见:

/** 
* Sample Method 
* 
* @param string $output 
* @return Project::Lib::Rest 
*/ 
+0

这是没有那么大,因为这样的双斜线将是用户谁只是阅读文档的来源(例如头文件)可见,它可能混淆他们。 – 2015-07-22 20:39:19