mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Renamed HelpParser::getFull() to HelpParser::getDetail()
This commit is contained in:
@ -43,6 +43,6 @@ class Action extends \yii\base\Action
|
|||||||
*/
|
*/
|
||||||
public function getHelp()
|
public function getHelp()
|
||||||
{
|
{
|
||||||
return HelpParser::getFull(new \ReflectionClass($this));
|
return HelpParser::getDetail(new \ReflectionClass($this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -318,7 +318,7 @@ class Controller extends \yii\base\Controller
|
|||||||
*/
|
*/
|
||||||
public function getHelp()
|
public function getHelp()
|
||||||
{
|
{
|
||||||
return HelpParser::getFull(new \ReflectionClass($this));
|
return HelpParser::getDetail(new \ReflectionClass($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -339,6 +339,6 @@ class Controller extends \yii\base\Controller
|
|||||||
$class = new \ReflectionClass($action);
|
$class = new \ReflectionClass($action);
|
||||||
}
|
}
|
||||||
|
|
||||||
return HelpParser::getFull($class);
|
return HelpParser::getDetail($class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class HelpParser
|
|||||||
* @param \Reflector $reflector
|
* @param \Reflector $reflector
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function getFull(\Reflector $reflector)
|
public static function getDetail(\Reflector $reflector)
|
||||||
{
|
{
|
||||||
$comment = strtr(trim(preg_replace('/^\s*\**( |\t)?/m', '', trim($reflector->getDocComment(), '/'))), "\r", '');
|
$comment = strtr(trim(preg_replace('/^\s*\**( |\t)?/m', '', trim($reflector->getDocComment(), '/'))), "\r", '');
|
||||||
if (preg_match('/^\s*@\w+/m', $comment, $matches, PREG_OFFSET_CAPTURE)) {
|
if (preg_match('/^\s*@\w+/m', $comment, $matches, PREG_OFFSET_CAPTURE)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user