PHP Класс WP_CLI\DocParser

Used to determine execution characteristics (arguments, etc.).
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$docComment string PHPdoc command for the command.

Открытые методы

Метод Описание
__construct ( string $docComment )
get_arg_args ( string $name ) : mixed | null Get the arguments for a given argument.
get_arg_desc ( string $name ) : string Get the description for a given argument.
get_longdesc ( ) : string Get the command's full description
get_param_args ( string $key ) : mixed | null Get the arguments for a given parameter.
get_param_desc ( string $key ) : string Get the description for a given parameter.
get_shortdesc ( ) : string Get the command's short description (e.g. summary).
get_synopsis ( ) : string Get the command's synopsis.
get_tag ( string $name ) : string Get the value for a given tag (e.g. "@alias" or "@subcommand")

Приватные методы

Метод Описание
get_arg_or_param_args ( string $regex ) : array | null Get the args for an arg or param
remove_decorations ( string $comment ) : string Remove unused cruft from PHPdoc comment.

Описание методов

__construct() публичный Метод

public __construct ( string $docComment )
$docComment string

get_arg_args() публичный Метод

Get the arguments for a given argument.
public get_arg_args ( string $name ) : mixed | null
$name string Argument's doc name.
Результат mixed | null

get_arg_desc() публичный Метод

Get the description for a given argument.
public get_arg_desc ( string $name ) : string
$name string Argument's doc name.
Результат string

get_longdesc() публичный Метод

Get the command's full description
public get_longdesc ( ) : string
Результат string

get_param_args() публичный Метод

Get the arguments for a given parameter.
public get_param_args ( string $key ) : mixed | null
$key string Parameter's key.
Результат mixed | null

get_param_desc() публичный Метод

Get the description for a given parameter.
public get_param_desc ( string $key ) : string
$key string Parameter's key.
Результат string

get_shortdesc() публичный Метод

Get the command's short description (e.g. summary).
public get_shortdesc ( ) : string
Результат string

get_synopsis() публичный Метод

Get the command's synopsis.
public get_synopsis ( ) : string
Результат string

get_tag() публичный Метод

Get the value for a given tag (e.g. "@alias" or "@subcommand")
public get_tag ( string $name ) : string
$name string Name for the tag, without '@'
Результат string

Описание свойств

$docComment защищенное свойство

PHPdoc command for the command.
protected string $docComment
Результат string