ControllerTask Class Reference

Inheritance diagram for ControllerTask:

Shell Object List of all members.

Public Member Functions

 __interactive ($controllerName=false)
 bake ($controllerName, $actions= '', $helpers=null, $components=null, $uses=null)
 bakeActions ($controllerName, $admin=null, $wannaUseSession=true)
 bakeTest ($className)
 execute ()
 getName ()
 help ()
 initialize ()
 listAll ($useDbConfig= 'default')

Public Attributes

 $path = CONTROLLERS
 $plugin = null
 $tasks = array('Project')

Detailed Description

Definition at line 33 of file controller.php.


Member Function Documentation

ControllerTask::__interactive ( controllerName = false  ) 

Interactive

private

Definition at line 103 of file controller.php.

References Shell::$uses, __(), Shell::_checkUnitTest(), bake(), bakeActions(), bakeTest(), Shell::getAdmin(), getName(), Shell::hr(), Shell::in(), Shell::out(), and underscore().

Referenced by execute().

ControllerTask::bake ( controllerName,
actions = '',
helpers = null,
components = null,
uses = null 
)

Assembles and writes a Controller file

Parameters:
string $controllerName Controller name
string $actions Actions to add, or set the whole controller to use $scaffold (set $actions to 'scaffold')
array $helpers Helpers to use in controller
array $components Components to use in controller
array $uses Models to use in controller
Returns:
string Baked controller private

Definition at line 406 of file controller.php.

References $filename, $out, Shell::$uses, Shell::_controllerPath(), Shell::_modelName(), camelize(), and Shell::createFile().

Referenced by __interactive(), and execute().

ControllerTask::bakeActions ( controllerName,
admin = null,
wannaUseSession = true 
)

Bake scaffold actions

Parameters:
string $controllerName Controller name
string $admin Admin route to use
boolean $wannaUseSession Set to true to use sessions, false otherwise
Returns:
string Baked actions private

Definition at line 245 of file controller.php.

References __(), Shell::_controllerPath(), Shell::_modelName(), Shell::_pluralName(), Shell::_singularName(), a(), Shell::err(), humanize(), App::import(), and variable().

Referenced by __interactive(), and execute().

ControllerTask::bakeTest ( className  ) 

Assembles and writes a unit test file

Parameters:
string $className Controller class name
Returns:
string Baked test private

Definition at line 461 of file controller.php.

References Shell::$className, $filename, $out, $path, Shell::createFile(), Shell::out(), and underscore().

Referenced by __interactive(), and execute().

ControllerTask::execute (  ) 

Execution method always used for tasks

public

Definition at line 67 of file controller.php.

References __interactive(), Shell::_checkUnitTest(), bake(), bakeActions(), bakeTest(), camelize(), Shell::getAdmin(), Shell::out(), and Configure::read().

ControllerTask::getName (  ) 

Forces the user to specify the controller he wants to bake, and returns the selected controller name.

Returns:
string Controller name public

Definition at line 533 of file controller.php.

References __(), Object::_stop(), camelize(), Shell::in(), listAll(), and Shell::out().

Referenced by __interactive().

ControllerTask::help (  ) 

Displays help contents

public

Reimplemented from Shell.

Definition at line 566 of file controller.php.

References Object::_stop(), Shell::hr(), and Shell::out().

ControllerTask::initialize (  ) 

Override initialize

public

Reimplemented from Shell.

Definition at line 60 of file controller.php.

ControllerTask::listAll ( useDbConfig = 'default'  ) 

Outputs and gets the list of possible models or controllers from database

Parameters:
string $useDbConfig Database configuration name
Returns:
array Set of controllers public

Definition at line 497 of file controller.php.

References __(), Shell::_controllerName(), Shell::_modelName(), Object::_stop(), config(), Shell::err(), ConnectionManager::getDataSource(), and Shell::out().

Referenced by getName().


Member Data Documentation

ControllerTask::$path = CONTROLLERS

Definition at line 54 of file controller.php.

Referenced by bakeTest().

ControllerTask::$plugin = null

Definition at line 40 of file controller.php.

ControllerTask::$tasks = array('Project')

Reimplemented from Shell.

Definition at line 47 of file controller.php.


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:55 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7