Config
[ class tree: Config ] [ index: Config ] [ all elements ]

Class: Config

Source Location: /Config-1.2/Config.php

Class Overview


Config


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 45]
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.



[ Top ]


Class Variables

$configType =  ''

[line 59]

Type of datasource for config Ex: IniCommented, Apache...

Type:   string


[ Top ]

$container =

[line 71]

Container object

Type:   object


[ Top ]

$datasrc =

[line 52]

Datasource Can be a file url, a dsn, an object...

Type:   mixed


[ Top ]

$parserOptions = array()

[line 65]

Options for parser

Type:   string


[ Top ]



Method Detail

Config (Constructor)   [line 80]

object reference Config( )

Constructor Creates a root container
  • Return: to config's root container object
  • Access: public

[ Top ]

getRoot   [line 103]

object reference &getRoot( )

Returns the root container for this config object
  • Return: to config's root container object
  • Access: public

[ Top ]

isConfigTypeRegistered   [line 92]

bool isConfigTypeRegistered( string $configType)

Returns true if container is registered
  • Access: public

Parameters:

string   $configType     Type of config

[ Top ]

parseConfig   [line 136]

mixed &parseConfig( mixed $datasrc, string $configType, [array $options = array()])

Parses the datasource contents This will set the root container for this config object
  • Return: PEAR_Error on error or Config_Container object
  • Access: public

Parameters:

mixed   $datasrc     Datasource to write to
string   $configType     Type of configuration
array   $options     (optional)Options for config container

[ Top ]

setRoot   [line 114]

true setRoot( object &$rootContainer)

Reset the root container to accept the object passed as parameter as a child
  • Return: on success or PEAR_Error
  • Access: public

Parameters:

object   $rootContainer     container to be used as the first child to root

[ Top ]

writeConfig   [line 165]

mixed writeConfig( [mixed $datasrc = null], [string $configType = null], [array $options = array()])

Writes the container contents to datasource
  • Return: PEAR_Error on error or true if ok
  • Access: public

Parameters:

mixed   $datasrc     (optional)Datasource to write to
string   $configType     (optional)Type of configuration
array   $options     (optional)Options for config container

[ Top ]


Documentation generated on Fri, 30 Apr 2004 22:58:10 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.