Inheritance diagram for Shell:

Public Member Functions | |
| __construct (&$dispatch) | |
| _checkArgs ($expectedNum, $command=null) | |
| _checkUnitTest () | |
| _controllerName ($name) | |
| _controllerPath ($name) | |
| _loadDbConfig () | |
| _loadModels () | |
| _modelKey ($name) | |
| _modelName ($name) | |
| _modelNameFromKey ($key) | |
| _pluralHumanName ($name) | |
| _pluralName ($name) | |
| _singularHumanName ($name) | |
| _singularName ($name) | |
| _welcome () | |
| createFile ($path, $contents) | |
| err ($string) | |
| error ($title, $msg) | |
| getAdmin () | |
| help () | |
| hr ($newline=false) | |
| in ($prompt, $options=null, $default=null) | |
| initialize () | |
| loadTasks () | |
| out ($string, $newline=true) | |
| shortPath ($file) | |
| startup () | |
Public Attributes | |
| $alias = null | |
| $args = array() | |
| $className = null | |
| $command = null | |
| $DbConfig = null | |
| $Dispatch = null | |
| $interactive = true | |
| $name = null | |
| $params = array() | |
| $shell = null | |
| $taskNames = array() | |
| $tasks = array() | |
| $uses = array() | |
Definition at line 33 of file shell.php.
| Shell::__construct | ( | &$ | dispatch | ) |
| Shell::_checkArgs | ( | $ | expectedNum, | |
| $ | command = null | |||
| ) |
Will check the number args matches otherwise throw an error
| integer | $expectedNum Expected number of paramters | |
| string | $command Command protected |
Definition at line 409 of file shell.php.
References error().
Referenced by AclShell::create(), and AclShell::delete().
| Shell::_checkUnitTest | ( | ) |
Action to create a Unit Test
Definition at line 470 of file shell.php.
References App::import().
Referenced by ModelTask::__interactive(), ControllerTask::__interactive(), BakeShell::all(), ModelTask::execute(), and ControllerTask::execute().
| Shell::_controllerName | ( | $ | name | ) |
Creates the proper controller plural name for the specified controller class name
| string | $name Controller class name |
Definition at line 540 of file shell.php.
References camelize(), and pluralize().
Referenced by BakeShell::all(), and ControllerTask::listAll().
| Shell::_controllerPath | ( | $ | name | ) |
Creates the proper controller path for the specified controller class name
| string | $name Controller class name |
Definition at line 530 of file shell.php.
References underscore().
Referenced by ControllerTask::bake(), and ControllerTask::bakeActions().
| Shell::_loadDbConfig | ( | ) |
| Shell::_loadModels | ( | ) |
if var $uses = true Loads AppModel file and constructs AppModel class makes $this->AppModel available to subclasses if var $uses is an array of models will load those models
Definition at line 219 of file shell.php.
References App::import(), ClassRegistry::init(), and uses().
| Shell::_modelKey | ( | $ | name | ) |
Creates the proper singular model key for associations
| string | $name Controller class name |
Definition at line 560 of file shell.php.
References singularize(), and underscore().
Referenced by ModelTask::doAssociations().
| Shell::_modelName | ( | $ | name | ) |
Creates the proper controller camelized name (singularized) for the specified name
| string | $name Name |
Definition at line 550 of file shell.php.
References camelize(), and singularize().
Referenced by BakeShell::all(), ControllerTask::bake(), ControllerTask::bakeActions(), ModelTask::doAssociations(), and ControllerTask::listAll().
| Shell::_modelNameFromKey | ( | $ | key | ) |
Creates the proper model name from a foreign key
| string | $key Foreign key |
Definition at line 570 of file shell.php.
References camelize().
Referenced by ModelTask::doAssociations().
| Shell::_pluralHumanName | ( | $ | name | ) |
Creates the plural human name used in views
| string | $name Controller name |
Definition at line 611 of file shell.php.
References humanize(), pluralize(), and underscore().
| Shell::_pluralName | ( | $ | name | ) |
Creates the plural name for views
| string | $name Name to use |
Definition at line 591 of file shell.php.
References pluralize(), and variable().
Referenced by ControllerTask::bakeActions().
| Shell::_singularHumanName | ( | $ | name | ) |
Creates the singular human name used in views
| string | $name Controller name |
Definition at line 601 of file shell.php.
References humanize(), singularize(), and underscore().
| Shell::_singularName | ( | $ | name | ) |
creates the singular name for use in views.
| string | $name |
Definition at line 581 of file shell.php.
References singularize(), and variable().
Referenced by ControllerTask::bakeActions().
| Shell::_welcome | ( | ) |
Displays a header for the shell
protected
Definition at line 187 of file shell.php.
References params(), and Configure::version().
Referenced by SchemaShell::initialize(), and I18nShell::startup().
| Shell::createFile | ( | $ | path, | |
| $ | contents | |||
| ) |
Creates a file at given path
| string | $path Where to put the file. | |
| string | $contents Content to put in the file. |
Definition at line 425 of file shell.php.
References $path, __(), and uses().
Referenced by ViewTask::bake(), TestTask::bake(), PluginTask::bake(), ModelTask::bake(), DbConfigTask::bake(), ControllerTask::bake(), ControllerTask::bakeTest(), and ProjectTask::createHome().
| Shell::err | ( | $ | string | ) |
Outputs to the stderr filehandle.
| string | $string Error text to output. public |
Definition at line 363 of file shell.php.
Referenced by TestSuiteShell::__canRun(), TestSuiteShell::__installSimpleTest(), PluginTask::__interactive(), ViewTask::__loadController(), ApiShell::__parseClass(), SchemaShell::__run(), BakeShell::all(), ViewTask::bake(), ProjectTask::bake(), DbConfigTask::bake(), ControllerTask::bakeActions(), AclShell::create(), SchemaShell::dump(), ProjectTask::execute(), PluginTask::execute(), ExtractTask::execute(), SchemaShell::generate(), ViewTask::getContent(), ControllerTask::listAll(), BakeShell::loadTasks(), TestSuiteShell::main(), ApiShell::main(), SchemaShell::run(), AclShell::startup(), and SchemaShell::view().
| Shell::error | ( | $ | title, | |
| $ | msg | |||
| ) |
Displays a formatted error message and exits the application
| string | $title Title of the error message | |
| string | $msg Error message public |
Definition at line 395 of file shell.php.
References $out.
Referenced by AclShell::create().
| Shell::getAdmin | ( | ) |
Checks for Configure::read('Routing.admin') and forces user to input it if not enabled
Definition at line 500 of file shell.php.
References config(), Configure::read(), write(), and Configure::write().
Referenced by ViewTask::__interactive(), ControllerTask::__interactive(), and ControllerTask::execute().
| Shell::help | ( | ) |
Outputs usage text on the standard output. Implement it in subclasses.
public
Reimplemented in AclShell, ApiShell, BakeShell, ConsoleShell, I18nShell, SchemaShell, ControllerTask, ExtractTask, ModelTask, PluginTask, ProjectTask, ViewTask, and TestSuiteShell.
| Shell::hr | ( | $ | newline = false |
) |
Outputs a series of minus characters to the standard output, acts as a visual separator.
| boolean | $newline If true, the outputs gets an added newline. public |
Definition at line 379 of file shell.php.
Referenced by ExtractTask::__extract(), ViewTask::__interactive(), TestTask::__interactive(), ModelTask::__interactive(), DbConfigTask::__interactive(), ControllerTask::__interactive(), DbConfigTask::__verify(), BakeShell::all(), ProjectTask::bake(), PluginTask::bake(), ModelTask::doAssociations(), PluginTask::execute(), ViewTask::getContent(), ViewTask::help(), ProjectTask::help(), PluginTask::help(), ExtractTask::help(), ControllerTask::help(), SchemaShell::help(), I18nShell::help(), BakeShell::help(), SchemaShell::initialize(), TestSuiteShell::main(), I18nShell::main(), ConsoleShell::main(), BakeShell::main(), and ApiShell::main().
| Shell::in | ( | $ | 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 316 of file shell.php.
Referenced by SchemaShell::__create(), ExtractTask::__extract(), ViewTask::__interactive(), TestTask::__interactive(), PluginTask::__interactive(), ModelTask::__interactive(), DbConfigTask::__interactive(), ControllerTask::__interactive(), SchemaShell::__update(), DbConfigTask::__verify(), ExtractTask::__writeFiles(), TestTask::bake(), ProjectTask::bake(), PluginTask::bake(), ModelTask::doAssociations(), ModelTask::doValidation(), SchemaShell::dump(), ProjectTask::execute(), PluginTask::execute(), ExtractTask::execute(), SchemaShell::generate(), ControllerTask::getName(), ExtractTask::help(), I18nShell::main(), ConsoleShell::main(), BakeShell::main(), and ApiShell::main().
| Shell::initialize | ( | ) |
Initializes the Shell acts as constructor for subclasses allows configuration of tasks prior to shell execution
public
Reimplemented in ApiShell, ConsoleShell, SchemaShell, ControllerTask, DbConfigTask, PluginTask, ViewTask, and TestSuiteShell.
| Shell::loadTasks | ( | ) |
Loads tasks defined in var $tasks
Reimplemented in BakeShell.
Definition at line 260 of file shell.php.
References $path, camelize(), ClassRegistry::getObject(), ClassRegistry::isKeySet(), and underscore().
| Shell::out | ( | $ | 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 347 of file shell.php.
Referenced by SchemaShell::__create(), ExtractTask::__extract(), ExtractTask::__extractTokens(), ViewTask::__interactive(), TestTask::__interactive(), ModelTask::__interactive(), DbConfigTask::__interactive(), ControllerTask::__interactive(), ExtractTask::__markerError(), TestSuiteShell::__run(), SchemaShell::__run(), SchemaShell::__update(), DbConfigTask::__verify(), ExtractTask::__writeFiles(), BakeShell::all(), TestTask::bake(), ProjectTask::bake(), PluginTask::bake(), ModelTask::bake(), ControllerTask::bakeTest(), AclShell::create(), ModelTask::doAssociations(), ModelTask::doValidation(), SchemaShell::dump(), TestTask::execute(), ProjectTask::execute(), PluginTask::execute(), ExtractTask::execute(), ControllerTask::execute(), SchemaShell::generate(), ControllerTask::getName(), TestSuiteShell::help(), ViewTask::help(), ProjectTask::help(), PluginTask::help(), ExtractTask::help(), ControllerTask::help(), SchemaShell::help(), I18nShell::help(), BakeShell::help(), ApiShell::help(), SchemaShell::initialize(), ConsoleShell::initialize(), ControllerTask::listAll(), TestSuiteShell::main(), I18nShell::main(), ConsoleShell::main(), BakeShell::main(), ApiShell::main(), AclShell::main(), SchemaShell::run(), I18nShell::startup(), AclShell::startup(), and SchemaShell::view().
| Shell::shortPath | ( | $ | file | ) |
| Shell::startup | ( | ) |
| Shell::$alias = null |
Definition at line 104 of file shell.php.
Referenced by ModelTask::doAssociations(), and ViewTask::execute().
| Shell::$className = null |
Definition at line 83 of file shell.php.
Referenced by ModelTask::bakeTest(), ControllerTask::bakeTest(), and ModelTask::doAssociations().
| Shell::$command = null |
Definition at line 90 of file shell.php.
Referenced by ConsoleShell::main(), and SchemaShell::run().
| Shell::$interactive = true |
Definition at line 47 of file shell.php.
Referenced by ViewTask::__interactive(), ModelTask::doAssociations(), and ModelTask::doValidation().
| Shell::$name = null |
Definition at line 97 of file shell.php.
Referenced by TestTask::__interactive(), ModelTask::__interactive(), DbConfigTask::__interactive(), BakeShell::all(), TestTask::bake(), ModelTask::bake(), ProjectTask::cakeAdmin(), SchemaShell::run(), and SchemaShell::startup().
| Shell::$tasks = array() |
Reimplemented in AclShell, BakeShell, I18nShell, ControllerTask, ModelTask, PluginTask, and ViewTask.
| Shell::$uses = array() |
Definition at line 125 of file shell.php.
Referenced by ControllerTask::__interactive(), and ControllerTask::bake().
1.4.7