我正在尝试为具有无限数量参数的函数编写 doxygen 块注释,然后我找不到合适的标签。提供的参数应该都是字符串,它们将在函数中连接起来形成一个新的字符串。
doxygen 标签的正确用法是什么?
我在phpdoc(doxygen 可以理解的格式)中经常看到的一种模式是:
/**
* Shortdesc.
* Longdesc. Longdesc. Longdesc. Longdesc.
* @param mixed $something Description
* @param mixed ... Description
*/
function foo() { ... }
是的,字面意思...
是变量名。
实际上,phpDocumentor 上的语法是$paramname,...
/**
* Builds a file path with the appropriate directory separator.
* @param string $segments,... unlimited number of path segments
* @return string Path
*/
function file_build_path(...$segments) {
return join(DIRECTORY_SEPARATOR, $segments);
}