[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/config/ -> config.class.php (sommaire)

\defgroup Config The Config package is the central place where all configuration settings are stored in pLog.

Poids: 110 lignes (5 kb)
Inclus ou requis:0 fois
Référencé: 37 fois
Nécessite: 0 fichiers

Définit 1 class

Config:: (1 méthode):
  getConfig()


Classe: Config  - X-Ref

\ingroup Config

This class is the main entry point to the Config module. It provides a static method that will return
a reference to the right config storage class.

Example of usage for retrieving a particular key:
<pre>
$config =& Config::getConfig();
$config->getValue( "my_config_value", $defaultValue );
</pre>

Example of saving some data back to the storage backend (we don't care which one it is):
<pre>
$config =& Config::getConfig();
$config->setValue( "my_new_key", $newValue );
...
$config->save();
</pre>

getConfig( $storage = DEFAULT_STORAGE_BACKEND, $params = null )   X-Ref
Makes sure that there is <b>only one</b> instance of this class for everybody, instead of creating
a new instance every time we need to load some configuration. This will save some resources
if we keep in mind that for example the database backend will load the entire table into memory
every time a new instance is created.

param: storage One of the storage methods implemented. Available ones are
param: params An array containing storage backend specific parameters. In the case
return: Returns an instance of the Config class, be it a new one if this is the first



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics