Public Member Functions | |
| __bootstrap () | |
| __buildPaths () | |
| __construct ($args=array()) | |
| __initConstants () | |
| __parseParams ($params) | |
| _initEnvironment () | |
| _stop ($status=0) | |
| dispatch () | |
| getInput ($prompt, $options=null, $default=null) | |
| help () | |
| parseParams ($params) | |
| ShellDispatcher ($args=array()) | |
| shiftArgs () | |
| stderr ($string) | |
| stdout ($string, $newline=true) | |
Public Attributes | |
| $args = array() | |
| $params = array() | |
| $shell = null | |
| $shellClass = null | |
| $shellCommand = null | |
| $shellName = null | |
| $shellPath = null | |
| $shellPaths = array() | |
| $stderr | |
| $stdin | |
| $stdout | |
Definition at line 34 of file cake.php.
| ShellDispatcher::__construct | ( | $ | args = array() |
) |
Constructor
| array | $args the argv. |
Definition at line 125 of file cake.php.
References $args, __buildPaths(), __initConstants(), _initEnvironment(), _stop(), dispatch(), and parseParams().
Referenced by dispatch(), and ShellDispatcher().
| ShellDispatcher::__bootstrap | ( | ) |
Initializes the environment and loads the Cake core.
Definition at line 233 of file cake.php.
References Configure::buildPaths(), cache(), config(), debug(), error(), Configure::getInstance(), params(), stderr(), and Configure::write().
Referenced by _initEnvironment(), and dispatch().
| ShellDispatcher::__buildPaths | ( | ) |
Builds the shell paths.
private
Definition at line 199 of file cake.php.
References $path, Folder(), Configure::read(), and underscore().
Referenced by __construct().
| ShellDispatcher::__initConstants | ( | ) |
Defines core configuration.
private
Definition at line 138 of file cake.php.
Referenced by __construct().
| ShellDispatcher::__parseParams | ( | $ | params | ) |
| ShellDispatcher::_initEnvironment | ( | ) |
Defines current working environment.
protected
Definition at line 162 of file cake.php.
References __bootstrap(), _stop(), check(), exists(), getInput(), params(), shiftArgs(), stderr(), and stdout().
Referenced by __construct().
| ShellDispatcher::_stop | ( | $ | status = 0 |
) |
Stop execution of the current script
| $status | see http://php.net/exit for values |
Definition at line 582 of file cake.php.
Referenced by __construct(), _initEnvironment(), and dispatch().
| ShellDispatcher::dispatch | ( | ) |
Dispatches a CLI request
public
Definition at line 274 of file cake.php.
References $path, $shell, __bootstrap(), __construct(), _stop(), camelize(), help(), shiftArgs(), stderr(), stdout(), and variable().
Referenced by __construct().
| ShellDispatcher::getInput | ( | $ | prompt, | |
| $ | options = null, |
|||
| $ | default = null | |||
| ) |
Prompts the user for input, and returns it.
| string | $prompt Prompt text. | |
| mixed | $options Array or string of options. | |
| string | $default Default input value. |
Definition at line 394 of file cake.php.
Referenced by _initEnvironment().
| ShellDispatcher::help | ( | ) |
Shows console help
public
Definition at line 534 of file cake.php.
References $path, Configure::listObjects(), params(), and Configure::version().
Referenced by dispatch().
| ShellDispatcher::parseParams | ( | $ | params | ) |
Parses command line options
| array | $params Parameters to parse public |
Definition at line 447 of file cake.php.
Referenced by __construct().
| ShellDispatcher::ShellDispatcher | ( | $ | args = array() |
) |
Constructs this ShellDispatcher instance.
| array | $args the argv. |
Definition at line 117 of file cake.php.
References $args, and __construct().
| ShellDispatcher::shiftArgs | ( | ) |
Removes first argument and shifts other arguments up
Definition at line 521 of file cake.php.
Referenced by _initEnvironment(), and dispatch().
| ShellDispatcher::stderr | ( | $ | string | ) |
Outputs to the stderr filehandle.
| string | $string Error text to output. public |
Definition at line 438 of file cake.php.
Referenced by __bootstrap(), _initEnvironment(), and dispatch().
| ShellDispatcher::stdout | ( | $ | string, | |
| $ | newline = true | |||
| ) |
Outputs to the stdout filehandle.
| string | $string String to output. | |
| boolean | $newline If true, the outputs gets an added newline. public |
Definition at line 425 of file cake.php.
Referenced by _initEnvironment(), and dispatch().
| ShellDispatcher::$args = array() |
| ShellDispatcher::$shell = null |
1.4.7