PHP Класс Phergie_Config, phergie

Автор: Phergie Development Team ([email protected])
Наследование: implements ArrayAccess
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
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.

Описание методов

offsetExists() публичный Метод

Checks to see if a configuration setting is assigned a value.
См. также: ArrayAccess::offsetExists()
public offsetExists ( string $offset ) : boolean
$offset string Configuration setting name
Результат boolean TRUE if the setting has a value, FALSE otherwise

offsetGet() публичный Метод

Returns the value of a configuration setting.
См. также: ArrayAccess::offsetGet()
public offsetGet ( string $offset ) : mixed
$offset string Configuration setting name
Результат mixed Configuration setting value or NULL if it is not assigned a value

offsetSet() публичный Метод

Sets the value of a configuration setting.
См. также: ArrayAccess::offsetSet()
public offsetSet ( string $offset, mixed $value ) : void
$offset string Configuration setting name
$value mixed New setting value
Результат void

offsetUnset() публичный Метод

Removes the value set for a configuration setting.
См. также: ArrayAccess::offsetUnset()
public offsetUnset ( string $offset ) : void
$offset string Configuration setting name
Результат void

read() публичный Метод

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
Результат Phergie_Config Provides a fluent interface

readArray() публичный Метод

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
Результат Phergie_Config Provides a fluent interface

write() публичный Метод

Writes the values of the current configuration settings back to their originating files.
public write ( ) : Phergie_Config
Результат Phergie_Config Provides a fluent interface

Описание свойств

$files защищенное свойство

Mapping of configuration file paths to an array of names of settings they contain
protected array $files
Результат array

$settings защищенное свойство

Mapping of setting names to their current corresponding values
protected array $settings
Результат array