category | Zend |
---|---|
package | Zend_Config |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Config |
__clone() : void
__construct(string $filename, mixed $section= null
, boolean|array $options= false
) : void
If the section name contains a ":" then the section name to the right is loaded and included into the properties. Note that the keys in this $section will override any keys of the same name in the sections that have been included via ":".
If the $section is null, then all sections in the ini file are loaded.
If any key includes a ".", then this will act as a separator to create a sub-property.
example ini file: [all] db.connection = database hostname = live
[staging : all]
hostname = staging
after calling $data = new Zend_Config_Ini($file, 'staging'); then $data->hostname === "staging" $data->db->connection === "database"
The $options parameter may be provided as either a boolean or an array. If provided as a boolean, this sets the $allowModifications option of Zend_Config. If provided as an array, there are three configuration directives that may be set. For example:
$options = array( 'allowModifications' => false, 'nestSeparator' => ':', 'skipExtends' => false, );
inherited_from | \Zend_Config::__construct() |
---|
string
mixed
boolean
array
\Zend_Config_Exception |
---|
__construct(array $array, boolean $allowModifications = false
) : void
Zend_Config also implements Countable and Iterator to facilitate easy access to the data.
array
boolean
__get(string $name) : mixed
string
mixed
__isset(string $name) : boolean
string
boolean
__set(string $name, mixed $value) : void
string
mixed
\Zend_Config_Exception |
---|
__unset(string $name) : void
string
\Zend_Config_Exception |
---|
_loadFileErrorHandler(integer $errno, string $errstr, string $errfile, integer $errline)
integer
string
string
integer
areAllSectionsLoaded() : boolean
boolean
count() : integer
integer
current() : mixed
mixed
get(string $name, mixed $default = null
) : mixed
string
mixed
mixed
getExtends() : array
array
getSectionName() : mixed
mixed
key() : mixed
mixed
merge(\Zend_Config $merge) : \Zend_Config
\Zend_Config
\Zend_Config
next()
readOnly() : boolean
boolean
rewind()
setExtend(string $extendingSection, string $extendedSection = null
) : void
string
string
setReadOnly()
toArray() : array
array
valid() : boolean
boolean
_arrayMergeRecursive(mixed $firstArray, mixed $secondArray) : array
mixed
First array
mixed
Second array to merge into first array
array
_assertValidExtend(string $extendingSection, string $extendedSection) : void
string
string
\Zend_Config_Exception |
---|
_loadIniFile(string $filename) : array
string
\Zend_Config_Exception |
---|
array
_parseIniFile(string $filename) : array
string
\Zend_Config_Exception |
---|
array
_processKey(array $config, string $key, string $value) : array
array
string
string
\Zend_Config_Exception |
---|
array
_processSection(array $iniArray, string $section, array $config = array()
) : array
array
string
array
\Zend_Config_Exception |
---|
array
$_allowModifications : boolean
$_count : integer
$_data : array
$_extends : array
array()
$_index : integer
$_loadFileErrorStr : string
null
Is null if there was no error while file loading
$_loadedSection : mixed
$_nestSeparator : string
'.'
$_sectionSeparator : string
':'
$_skipExtends : boolean
false
$_skipNextIteration : boolean