ShellDispatcher Class Info:
- Class Declaration:
class ShellDispatcher
- File name:
- Cake/Console/ShellDispatcher.php
- Description:
Shell dispatcher handles dispatching cli commands.
- Package
- Cake.Console
Properties:
-
args array
Contains arguments parsed from the command line.
-
params array
Contains command switches parsed from the command line.
_bootstrap
topInitializes the environment and loads the Cake core.
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 122
- Return
boolean Success.
__construct
topConstructor
The execution of the script is stopped after dispatching the request with a status code of either 0 or 1 according to the result of the dispatch.
- Parameters:
-
-
array $args optional array ( )
the argv from PHP
-
boolean $bootstrap optional true
Should the environment be bootstrapped.
-
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 49
dispatch
topDispatches a CLI request
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 155
- Return
boolean
- Throws
MissingShellMethodException
_getShell
topGet shell to use, either plugin shell or application shell
All paths in the loaded shell paths are searched.
- Parameters:
-
-
string $shell required
Optionally the name of a plugin
-
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 206
- Return
mixed An object
- Throws
MissingShellException when errors are encountered.
help
topShows console help. Performs an internal dispatch to the CommandList Shell
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 317
- Return
void
_initConstants
topDefines core configuration.
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 77
- Return
void
_initEnvironment
topDefines current working environment.
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 100
- Return
void
- Throws
CakeException
parseParams
topParses command line options and extracts the directory paths from $params
- Parameters:
-
-
array $args required
Parameters to parse
-
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 232
- Return
void
_parsePaths
topParses out the paths from from the argv
- Parameters:
-
-
array $args required
-
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 288
- Return
void
run
topRun the dispatcher
- Parameters:
-
-
array $argv required
The argv from PHP
-
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 67
- Return
void
shiftArgs
topRemoves first argument and shifts other arguments up
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 308
- Return
mixed Null if there are no arguments otherwise the shifted argument
_stop
topStop execution of the current script
- Parameters:
-
-
integer|string $status optional 0
see http://php.net/exit for values
-
- Method defined in:
- Cake/Console/ShellDispatcher.php on line 328
- Return
void
