WP_CLI
DocParser::get_tag()
Get the value for a given tag (e.g. "@alias" or "@subcommand")
Метод класса: DocParser{}
Хуков нет.
Возвращает
Строку
.
Использование
$DocParser = new DocParser(); $DocParser->get_tag( $name );
- $name(строка) (обязательный)
- Name for the tag, without '@'
Код DocParser::get_tag() DocParser::get tag WP-CLI 2.8.0-alpha
public function get_tag( $name ) { if ( preg_match( '|^@' . $name . '\s+([a-z-_0-9]+)|m', $this->doc_comment, $matches ) ) { return $matches[1]; } return ''; }