PhpDocs:可以在参数描述中链接方法吗?
是否可以在PhpDocs:可以在参数描述中链接方法吗?,php,documentation,phpdoc,phpdocumentor2,Php,Documentation,Phpdoc,Phpdocumentor2,是否可以在@deprecated标记中内联链接到我的项目中的另一个方法/类/属性/等?像这样: /** * Method description * @deprecated 1.0 Reason for deprecation, use {@link newMethod()} instead! * @param string $str * @param string|null $str2 * @return bool */ public function method($str, $s
@deprecated
标记中内联链接到我的项目中的另一个方法/类/属性/等?像这样:
/**
* Method description
* @deprecated 1.0 Reason for deprecation, use {@link newMethod()} instead!
* @param string $str
* @param string|null $str2
* @return bool
*/
public function method($str, $str2) {
// TODO: Code...
}
...
?根据PHPdoc.org,您可以使用该标签
/**
* @see http://example.com/my/bar Documentation of Foo.
* @see MyClass::$items For the property whose items are counted.
* @see MyClass::setItems() To set the items for this collection.
*
* @return integer Indicates the number of items.
*/
function count()
{
<...>
}
/**
*@见http://example.com/my/bar Foo的文档。
*@see MyClass::$items,用于计算项目的属性。
*@请参阅MyClass::setItems()以设置此集合的项。
*
*@return integer表示项目数。
*/
函数计数()
{
}
还有:
建议(但不是必需的)提供一个附加说明,说明不推荐使用关联元素的原因。如果它被另一个方法取代,建议在同一个PHPDoc中添加一个@see标记,指向新元素
你可以使用标签