How to disable slash command syntax in Doxygen

馋奶兔 提交于 2019-12-23 09:27:08

问题


I've run into a problem with PHP 5.3 namespacing and Doxygen comments.

Example:

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

Doxygen gives me the following warnings:

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

What can I do to fix this or turn off \commands and only use @commands


回答1:


Try escaping your backslashes, i.e. use

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

\\ is actually a doxygen command which just prints a backslash.

See also Documenting PHP with Doxygen: The Pros and Cons:

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


来源:https://stackoverflow.com/questions/9385984/how-to-disable-slash-command-syntax-in-doxygen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!