PHP Class Phergie_Config, phergie

Author: Phergie Development Team ([email protected])
Inheritance: implements ArrayAccess
Afficher le fichier Open project: phergie/phergie Class Usage Examples

Protected Properties

Свойство Type Description
$files array Mapping of configuration file paths to an array of names of settings they contain
$settings array Mapping of setting names to their current corresponding values

Méthodes publiques

Méthode Description
offsetExists ( string $offset ) : boolean Checks to see if a configuration setting is assigned a value.
offsetGet ( string $offset ) : mixed Returns the value of a configuration setting.
offsetSet ( string $offset, mixed $value ) : void Sets the value of a configuration setting.
offsetUnset ( string $offset ) : void Removes the value set for a configuration setting.
read ( string $file ) : Phergie_Config Includes a specified PHP configuration file and incorporates its return value (which should be an associative array) into the current configuration settings.
readArray ( array $settings ) : Phergie_Config Merges an associative array of configuration setting values into the current configuration settings.
write ( ) : Phergie_Config Writes the values of the current configuration settings back to their originating files.

Method Details

offsetExists() public méthode

Checks to see if a configuration setting is assigned a value.
See also: ArrayAccess::offsetExists()
public offsetExists ( string $offset ) : boolean
$offset string Configuration setting name
Résultat boolean TRUE if the setting has a value, FALSE otherwise

offsetGet() public méthode

Returns the value of a configuration setting.
See also: ArrayAccess::offsetGet()
public offsetGet ( string $offset ) : mixed
$offset string Configuration setting name
Résultat mixed Configuration setting value or NULL if it is not assigned a value

offsetSet() public méthode

Sets the value of a configuration setting.
See also: ArrayAccess::offsetSet()
public offsetSet ( string $offset, mixed $value ) : void
$offset string Configuration setting name
$value mixed New setting value
Résultat void

offsetUnset() public méthode

Removes the value set for a configuration setting.
See also: ArrayAccess::offsetUnset()
public offsetUnset ( string $offset ) : void
$offset string Configuration setting name
Résultat void

read() public méthode

Includes a specified PHP configuration file and incorporates its return value (which should be an associative array) into the current configuration settings.
public read ( string $file ) : Phergie_Config
$file string Path to the file to read
Résultat Phergie_Config Provides a fluent interface

readArray() public méthode

Merges an associative array of configuration setting values into the current configuration settings.
public readArray ( array $settings ) : Phergie_Config
$settings array Associative array of configuration setting values keyed by setting name
Résultat Phergie_Config Provides a fluent interface

write() public méthode

Writes the values of the current configuration settings back to their originating files.
public write ( ) : Phergie_Config
Résultat Phergie_Config Provides a fluent interface

Property Details

$files protected_oe property

Mapping of configuration file paths to an array of names of settings they contain
protected array $files
Résultat array

$settings protected_oe property

Mapping of setting names to their current corresponding values
protected array $settings
Résultat array