Config/Ini.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Config
- Version
- $Id$
\Zend_Config_Ini
- Parent(s)
- \Zend_Config
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
string $_nestSeparator = '.'
'.'
Details- Type
- string
string $_sectionSeparator = ':'
':'
Details- Type
- string
Methods
__construct(string $filename, mixed $section = null, boolean | array $options = false) : void
Loads the section $section from the config file $filename for access facilitated by nested object properties.
Name | Type | Description |
---|---|---|
$filename | string | |
$section | mixed | |
$options | boolean | array |
Exception | Description |
---|---|
\Zend_Config_Exception |
_loadIniFile(string $filename) : array
Load the ini file and preprocess the section separator (':' in the section name (that is used for section extension) so that the resultant array has the correct section names and the extension information is stored in a sub-key called ';extends'. We use ';extends' as this can never be a valid key name in an INI file that has been loaded using parse_ini_file().
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Config_Exception |
_parseIniFile(string $filename) : array
Load the INI file from disk using parse_ini_file(). Use a private error handler to convert any loading errors into a Zend_Config_Exception
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Config_Exception |
_processKey(array $config, string $key, string $value) : array
Assign the key's value to the property list. Handles the nest separator for sub-properties.
Name | Type | Description |
---|---|---|
$config | array | |
$key | string | |
$value | string |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Config_Exception |
_processSection(array $iniArray, string $section, array $config = array()) : array
Process each element in the section and handle the ";extends" inheritance key. Passes control to _processKey() to handle the nest separator sub-property syntax that may be used within the key name.
Name | Type | Description |
---|---|---|
$iniArray | array | |
$section | string | |
$config | array |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Config_Exception |