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
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 메소드들

메소드 설명
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