2016-12-23 9 views
3

/class/property/등의 다른 메소드에 링크 할 수 있습니까? 내 프로젝트 내부에 @deprecated 태그 안에 있습니까? 이렇게 :PhpDocs : 매개 변수 설명에 메서드를 연결할 수 있습니까?

/** 
* 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... 
} 

... 

?

+0

[@see] (https://www.phpdoc.org/docs/latest/references/phpdoc/tags/see.html) 태그를 사용할 수 있습니다. – Dragos

답변

2

PHPdoc.org에 따르면 @see 태그를 사용할 수 있습니다. 또한

/** 
* @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() 
{ 
    <...> 
} 

, PHPdoc.org recommends to use @see in case of a @deprecated method는 :

이 관련 요소가되지 않는 이유라는 추가 설명을 제공하는 것이 좋습니다 (필수 사항은 아님)입니다. 만약 다른 메소드에 의해 대체된다면 같은 PHPDoc에 새로운 요소를 가리키는 @see 태그를 추가하는 것이 좋습니다.