Свойство | Type | Description | |
---|---|---|---|
$args | array | Contains arguments parsed from the command line. |
Свойство | Type | Description | |
---|---|---|---|
$_aliases | array | List of connected aliases. |
Méthode | Description | |
---|---|---|
__construct ( array $args = [], boolean $bootstrap = true ) | Constructor | |
addShortPluginAliases ( ) : array | For all loaded plugins, add a short alias | |
alias ( string $short, string | null $original = null ) : string | false | Add an alias for a shell command. | |
dispatch ( array $extra = [] ) : integer | Dispatches a CLI request | |
findShell ( string $shell ) : |
Get shell to use, either plugin shell or application shell | |
help ( ) : void | Shows console help. Performs an internal dispatch to the CommandList Shell | |
resetAliases ( ) : void | Clear any aliases that have been set. | |
run ( array $argv, array $extra = [] ) : integer | Run the dispatcher | |
shiftArgs ( ) : mixed | Removes first argument and shifts other arguments up | |
version ( ) : void | Prints the currently installed version of CakePHP. Performs an internal dispatch to the CommandList Shell |
Méthode | Description | |
---|---|---|
_bootstrap ( ) : boolean | Initializes the environment and loads the CakePHP core. | |
_createShell ( string $className, string $shortName ) : |
Create the given shell name, and set the plugin property | |
_dispatch ( array $extra = [] ) : boolean | Dispatch a request. | |
_handleAlias ( string $shell ) : string | If the input matches an alias, return the aliased shell name | |
_initEnvironment ( ) : void | Defines current working environment. | |
_shellExists ( string $shell ) : string | boolean | Check if a shell class exists for the given name. |
public __construct ( array $args = [], boolean $bootstrap = true ) | ||
$args | array | the argv from PHP |
$bootstrap | boolean | Should the environment be bootstrapped. |
protected _bootstrap ( ) : boolean | ||
Résultat | boolean | Success. |
protected _createShell ( string $className, string $shortName ) : |
||
$className | string | The class name to instantiate |
$shortName | string | The plugin-prefixed shell name |
Résultat | A shell instance. |
protected _handleAlias ( string $shell ) : string | ||
$shell | string | Optionally the name of a plugin or alias |
Résultat | string | Shell name with plugin prefix |
protected _initEnvironment ( ) : void | ||
Résultat | void |
public addShortPluginAliases ( ) : array | ||
Résultat | array | the resultant list of aliases |
public dispatch ( array $extra = [] ) : integer | ||
$extra | array | Extra parameters that you can manually pass to the Shell to be dispatched. Built-in extra parameter is : - `requested` : if used, will prevent the Shell welcome message to be displayed |
Résultat | integer | The cli command exit code. 0 is success. |
public static resetAliases ( ) : void | ||
Résultat | void |
protected static array $_aliases | ||
Résultat | array |
public array $args | ||
Résultat | array |