Shell dispatcher handles dispatching cli commands.
$args
public array
$params
public array
Set the error/exception handlers for the console based on the Error.consoleHandler
, and Exception.consoleHandler
values if they are set. If they are not set, the default ConsoleErrorHandler will be used.
__construct( array $args array() , boolean $bootstrap true )
Constructor
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.
$args
optional array() $bootstrap
optional true _bootstrap( )
Initializes the environment and loads the CakePHP core.
_getShell( string $shell )
Get shell to use, either plugin shell or application shell
All paths in the loaded shell paths are searched.
$shell
MissingShellException
_initEnvironment( )
Defines current working environment.
CakeException
_isAbsolutePath( string $path )
Checks whether the given path is absolute or relative.
$path
_isWindowsPath( string $path )
Checks whether the given path is Window OS path.
$path
_parsePaths( array $args )
Parses out the paths from from the argv
$args
_stop( integer|string $status 0 )
Stop execution of the current script
$status
optional 0 dispatch( )
Dispatches a CLI request
MissingShellMethodException
help( )
Shows console help. Performs an internal dispatch to the CommandList Shell
parseParams( array $args )
Parses command line options and extracts the directory paths from $params
$args
run( array $argv )
Run the dispatcher
$argv
setErrorHandlers( )
Set the error/exception handlers for the console based on the Error.consoleHandler
, and Exception.consoleHandler
values if they are set. If they are not set, the default ConsoleErrorHandler will be used.
shiftArgs( )
Removes first argument and shifts other arguments up
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-ShellDispatcher.html