[ Index ]
 

Code source de CakePHP 1.1.13.4450

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/cake/libs/ -> configure.php (sommaire)

Short description for file. Long description for file

Copyright: Copyright 2005-2007, Cake Software Foundation, Inc.
License: http://www.opensource.org/licenses/mit-license.php The MIT License
Version: $Revision: 4409 $
Poids: 354 lignes (9 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 1 fichier
 cake/config/config.php

Définit 1 class

Configure:: (13 méthodes):
  getInstance()
  write()
  read()
  delete()
  load()
  version()
  __configVarNames()
  __buildModelPaths()
  __buildViewPaths()
  __buildControllerPaths()
  __buildHelperPaths()
  __buildComponentPaths()
  __loadBootstrap()


Classe: Configure  - X-Ref

Short description for file.

Long description for file

getInstance()   X-Ref
Return a singleton instance of Configure.

return: Configure instance

write($config, $value = null)   X-Ref
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]'));

param: array $config
return: void

read($var = 'debug')   X-Ref
Used to read Configure::$var

Usage
Configure::read('Name'); will return all values for Name
Configure::read('Name.key'); will return only the value of Configure::Name[key]

param: string $var
return: string value of Configure::$var

delete($var = null)   X-Ref
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]

param: string $var the var to be deleted
return: void

load($fileName)   X-Ref
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');

param: string $fileName name of file to load, extension must be .php and only the name should be used, not the extenstion
return: Configure::write

version()   X-Ref
Used to determine the current version of CakePHP

Usage Configure::version();

return: string Current version of CakePHP

__configVarNames($name)   X-Ref
Checks $name for dot notation to create dynamic Configure::$var as an array when needed.

param: mixed $name
return: array

__buildModelPaths($modelPaths)   X-Ref
Sets the var modelPaths

param: array $modelPaths

__buildViewPaths($viewPaths)   X-Ref
Sets the var viewPaths

param: array $viewPaths

__buildControllerPaths($controllerPaths)   X-Ref
Sets the var controllerPaths

param: array $controllerPaths

__buildHelperPaths($helperPaths)   X-Ref
Sets the var helperPaths

param: array $helperPaths

__buildComponentPaths($componentPaths)   X-Ref
Sets the var componentPaths

param: array $componentPaths

__loadBootstrap()   X-Ref
Loads the app/config/bootstrap.php
If the alternative paths are set in this file
they will be added to the paths vars




Généré le : Sun Feb 25 19:27:47 2007 par Balluche grâce à PHPXref 0.7