[ Index ]
 

Code source de PHP PEAR 1.4.5

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

title

Body

[fermer]

/ -> Config.php (sommaire)

(pas de description)

Poids: 231 lignes (9 kb)
Inclus ou requis: 7 fois
Référencé: 0 fois
Nécessite: 2 fichiers
 PEAR.php
 Config/Container.php

Définit 1 class

Config:: (7 méthodes):
  Config()
  isConfigTypeRegistered()
  registerConfigType()
  getRoot()
  setRoot()
  parseConfig()
  writeConfig()


Classe: Config  - X-Ref

Config

This class allows for parsing and editing of configuration datasources.
Do not use this class only to read datasources because of the overhead
it creates to keep track of the configuration structure.

Config()   X-Ref
Constructor
Creates a root container


isConfigTypeRegistered($configType)   X-Ref
Returns true if container is registered

param: string  $configType  Type of config
return: bool

registerConfigType($configType, $configInfo = false)   X-Ref
Register a new container

author: Greg Beaver <cellog@users.sourceforge.net>
param: string       $configType  Type of config
param: array|false  $configInfo  Array of format:
return: true|PEAR_Error  true on success

getRoot()   X-Ref
Returns the root container for this config object

return: object  reference to config's root container object

setRoot(&$rootContainer)   X-Ref
Sets the content of the root Config_container object.

This method will replace the current child of the root
Config_Container object by the given object.

param: object  $rootContainer  container to be used as the first child to root
return: mixed    true on success or PEAR_Error

parseConfig($datasrc, $configType, $options = array()   X-Ref
Parses the datasource contents

This method will parse the datasource given and fill the root
Config_Container object with other Config_Container objects.

param: mixed   $datasrc     Datasource to parse
param: string  $configType  Type of configuration
param: array   $options     Options for the parser
return: mixed PEAR_Error on error or Config_Container object

writeConfig($datasrc = null, $configType = null, $options = array()   X-Ref
Writes the container contents to the datasource.

param: mixed   $datasrc     Datasource to write to
param: string  $configType  Type of configuration
param: array   $options     Options for config container
return: mixed PEAR_Error on error or true if ok



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7