Configure Class Reference

Inheritance diagram for Configure:

Object

List of all members.


Public Member Functions

 buildPaths ($paths)
 corePaths ($type=null)
 delete ($var=null)
getInstance ($boot=true)
 listObjects ($type, $path=null, $cache=true)
 load ($fileName)
 read ($var= 'debug')
 store ($type, $name, $data=array())
 version ()
 write ($config, $value=null)

Public Attributes

 $behaviorPaths = array()
 $componentPaths = array()
 $controllerPaths = array()
 $debug = null
 $helperPaths = array()
 $modelPaths = array()
 $pluginPaths = array()
 $vendorPaths = array()
 $viewPaths = array()

Detailed Description

Definition at line 37 of file configure.php.


Member Function Documentation

Configure::buildPaths ( paths  ) 

Sets the paths for the given object type

Parameters:
array $paths paths defines in config/bootstrap.php private

Definition at line 577 of file configure.php.

References getInstance(), and vendor().

Configure::corePaths ( type = null  ) 

Returns key => value list of all paths where core libs are found passing $type will only return the values for $key.

Parameters:
string $type valid values are: 'model', 'behavior', 'controller', 'component', 'view', 'helper', 'libs', and 'cake'
Returns:
array numeric keyed array of core lib paths public

Definition at line 458 of file configure.php.

References Cache::read(), vendor(), and Cache::write().

Referenced by TestSuiteShell::initialize(), and Debugger::trimPath().

Configure::delete ( var = null  ) 

Used to delete a var from the Configure instance.

Usage: Configure::delete('Name'); will delete the entire Configure::Name Configure::delete('Name.key'); will delete only the Configure::Name[key]

Parameters:
string $var the var to be deleted public

Definition at line 346 of file configure.php.

References getInstance().

& Configure::getInstance ( boot = true  ) 

Return a singleton instance of Configure.

Returns:
Configure instance public

Definition at line 121 of file configure.php.

Referenced by buildPaths(), delete(), listObjects(), load(), paths(), read(), store(), version(), and write().

Configure::listObjects ( type,
path = null,
cache = true 
)

Returns an index of objects of the given type, with the physical path to each object

Parameters:
string $type Type of object, i.e. 'model', 'controller', 'helper', or 'plugin'
mixed $path Optional
Returns:
Configure instance public

Definition at line 137 of file configure.php.

References Inflector::getInstance(), getInstance(), Cache::read(), and vendor().

Referenced by ShellDispatcher::help(), TestSuiteShell::initialize(), ConsoleShell::initialize(), listClasses(), loadControllers(), loadModels(), ApiShell::main(), and CakeSchema::read().

Configure::load ( fileName  ) 

Will load a file from app/config/configure_file.php variables in the files should be formated like: $config['name'] = 'value'; These will be used to create dynamic Configure vars.

Usage Configure::load('configure_file');

Parameters:
string $fileName name of file to load, extension must be .php and only the name should be used, not the extenstion public

Definition at line 367 of file configure.php.

References $config, config(), and getInstance().

Configure::read ( var = 'debug'  ) 

Configure::store ( type,
name,
data = array() 
)

Used to write a config file to the server.

Configure::store('Model', 'class.paths', array('Users' => array('path' => 'users', 'plugin' => true)));

Parameters:
string $type Type of config file to write, ex: Models, Controllers, Helpers, Components
string $name file name.
array $data array of values to store. public

Definition at line 424 of file configure.php.

References $write, and getInstance().

Configure::version (  ) 

Used to determine the current version of CakePHP

Usage Configure::version();

Returns:
string Current version of CakePHP public

Definition at line 405 of file configure.php.

References $config, config(), and getInstance().

Referenced by Shell::_welcome(), Debugger::getInstance(), and ShellDispatcher::help().

Configure::write ( config,
value = null 
)

Used to write a dynamic var in the Configure instance.

Usage Configure::write('One.key1', 'value of the Configure::One[key1]'); Configure::write(array('One.key1' => 'value of the Configure::One[key1]')); Configure::write('One', array('key1'=>'value of the Configure::One[key1]', 'key2'=>'value of the Configure::One[key2]'); Configure::write(array('One.key1' => 'value of the Configure::One[key1]', 'One.key2' => 'value of the Configure::One[key2]'));

Parameters:
array $config Name of var to write
mixed $value Value to set for var public

Definition at line 247 of file configure.php.

References $config, and getInstance().

Referenced by ProjectTask::cakeAdmin(), Shell::getAdmin(), and ProjectTask::securitySalt().


Member Data Documentation

Configure::$behaviorPaths = array()

Definition at line 51 of file configure.php.

Configure::$componentPaths = array()

Definition at line 65 of file configure.php.

Configure::$controllerPaths = array()

Definition at line 58 of file configure.php.

Configure::$debug = null

Definition at line 100 of file configure.php.

Configure::$helperPaths = array()

Definition at line 79 of file configure.php.

Configure::$modelPaths = array()

Definition at line 44 of file configure.php.

Configure::$pluginPaths = array()

Definition at line 86 of file configure.php.

Configure::$vendorPaths = array()

Definition at line 93 of file configure.php.

Configure::$viewPaths = array()

Definition at line 72 of file configure.php.


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