ShellDispatcher Class Reference

List of all members.


Public Member Functions

 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

Detailed Description

Definition at line 36 of file cake.php.


Member Function Documentation

ShellDispatcher::dispatch (  ) 

Dispatches a CLI request

public

Definition at line 249 of file cake.php.

References $shell, Inflector::camelize(), help(), Configure::read(), shiftArgs(), and Inflector::variable().

ShellDispatcher::getInput ( prompt,
options = null,
default = null 
)

Prompts the user for input, and returns it.

Parameters:
string $prompt Prompt text.
mixed $options Array or string of options.
string $default Default input value.
Returns:
Either the default value, or the user-provided input. public

Definition at line 386 of file cake.php.

ShellDispatcher::help (  ) 

Shows console help

public

Definition at line 525 of file cake.php.

References Configure::listObjects(), params(), r(), and Configure::version().

Referenced by dispatch().

ShellDispatcher::parseParams ( params  ) 

Parses command line options

Parameters:
array $params Parameters to parse public

Definition at line 440 of file cake.php.

References a(), and params().

ShellDispatcher::ShellDispatcher ( args = array()  ) 

Constructs this ShellDispatcher instance.

Parameters:
array $args the argv.

Definition at line 119 of file cake.php.

References $args.

ShellDispatcher::shiftArgs (  ) 

Removes first argument and shifts other arguments up

Returns:
boolean False if there are no arguments public

Definition at line 512 of file cake.php.

Referenced by dispatch().

ShellDispatcher::stderr ( string  ) 

Outputs to the stderr filehandle.

Parameters:
string $string Error text to output. public

Definition at line 431 of file cake.php.

ShellDispatcher::stdout ( string,
newline = true 
)

Outputs to the stdout filehandle.

Parameters:
string $string String to output.
boolean $newline If true, the outputs gets an added newline. public

Definition at line 418 of file cake.php.


Member Data Documentation

ShellDispatcher::$args = array()

Definition at line 71 of file cake.php.

Referenced by ShellDispatcher().

ShellDispatcher::$params = array()

Definition at line 64 of file cake.php.

ShellDispatcher::$shell = null

Definition at line 78 of file cake.php.

Referenced by dispatch().

ShellDispatcher::$shellClass = null

Definition at line 85 of file cake.php.

ShellDispatcher::$shellCommand = null

Definition at line 92 of file cake.php.

ShellDispatcher::$shellName = null

Definition at line 113 of file cake.php.

ShellDispatcher::$shellPath = null

Definition at line 106 of file cake.php.

ShellDispatcher::$shellPaths = array()

Definition at line 99 of file cake.php.

ShellDispatcher::$stderr

Definition at line 57 of file cake.php.

ShellDispatcher::$stdin

Definition at line 43 of file cake.php.

ShellDispatcher::$stdout

Definition at line 50 of file cake.php.


The documentation for this class was generated from the following file: