PHP Класс yii\console\controllers\HelpController

This command displays the available command list in the application or the detailed instructions about using a specific command. This command can be used as follows on command line: yii help [command name] In the above, if the command name is not provided, all available commands will be displayed.
С версии: 2.0
Автор: Qiang Xue ([email protected])
Наследование: extends yii\console\Controller
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
actionIndex ( string $command = null ) : integer Displays available commands or the detailed information about a particular command.
getActions ( Controller $controller ) : array Returns all available actions of the specified controller.
getCommands ( ) : array Returns all available command names.

Защищенные методы

Метод Описание
formatOptionAliases ( Controller $controller, string $option ) : string
formatOptionHelp ( string $name, boolean $required, string $type, mixed $defaultValue, string $comment ) : string Generates a well-formed string for an argument or option.
getCommandDescriptions ( ) : array Returns an array of commands an their descriptions.
getCommandHelp ( Controller $controller ) Displays the overall information of the command.
getDefaultHelp ( ) Displays all available commands.
getDefaultHelpHeader ( ) : string Return a default help header.
getModuleCommands ( Module $module ) : array Returns available commands of a specified module.
getScriptName ( ) : string
getSubCommandHelp ( Controller $controller, string $actionID ) Displays the detailed information of a command action.
validateControllerClass ( string $controllerClass ) : boolean Validates if the given class is a valid console controller class.

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

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

Displays available commands or the detailed information about a particular command.
public actionIndex ( string $command = null ) : integer
$command string The name of the command to show help about. If not provided, all available commands will be displayed.
Результат integer the exit status

formatOptionAliases() защищенный Метод

С версии: 2.0.8
protected formatOptionAliases ( Controller $controller, string $option ) : string
$controller yii\console\Controller the controller instance
$option string the option name
Результат string the formatted string for the alias argument or option

formatOptionHelp() защищенный Метод

Generates a well-formed string for an argument or option.
protected formatOptionHelp ( string $name, boolean $required, string $type, mixed $defaultValue, string $comment ) : string
$name string the name of the argument or option
$required boolean whether the argument is required
$type string the type of the option or argument
$defaultValue mixed the default value of the option or argument
$comment string comment about the option or argument
Результат string the formatted string for the argument or option

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

Returns all available actions of the specified controller.
public getActions ( Controller $controller ) : array
$controller yii\console\Controller the controller instance
Результат array all available action IDs.

getCommandDescriptions() защищенный Метод

Returns an array of commands an their descriptions.
protected getCommandDescriptions ( ) : array
Результат array all available commands as keys and their description as values.

getCommandHelp() защищенный Метод

Displays the overall information of the command.
protected getCommandHelp ( Controller $controller )
$controller yii\console\Controller the controller instance

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

Returns all available command names.
public getCommands ( ) : array
Результат array all available command names

getDefaultHelp() защищенный Метод

Displays all available commands.
protected getDefaultHelp ( )

getDefaultHelpHeader() защищенный Метод

Return a default help header.
С версии: 2.0.11
protected getDefaultHelpHeader ( ) : string
Результат string default help header.

getModuleCommands() защищенный Метод

Returns available commands of a specified module.
protected getModuleCommands ( Module $module ) : array
$module yii\base\Module the module instance
Результат array the available command names

getScriptName() защищенный Метод

protected getScriptName ( ) : string
Результат string the name of the cli script currently running.

getSubCommandHelp() защищенный Метод

Displays the detailed information of a command action.
protected getSubCommandHelp ( Controller $controller, string $actionID )
$controller yii\console\Controller the controller instance
$actionID string action ID

validateControllerClass() защищенный Метод

Validates if the given class is a valid console controller class.
protected validateControllerClass ( string $controllerClass ) : boolean
$controllerClass string
Результат boolean