Ini file configuration engine.
Since IniReader uses parse_ini_file underneath, you should be aware that this class shares the same behavior, especially with regards to boolean and null values.
In addition to the native parse_ini_file features, IniReader also allows you to create nested array structures through usage of . delimited names. This allows you to create nested arrays structures in an ini config file. For example:
db.password = secret would turn into array('db' => array('password' => 'secret'))
You can nest properties as deeply as needed using .'s. In addition to using . you can use standard ini section notation to create nested structures:
[section]
key = value
Once loaded into Configure, the above would be accessed using:
`Configure::read('section.key');
You can combine . separated values with sections to create more deeply nested structures.
IniReader also manipulates how the special ini values of 'yes', 'no', 'on', 'off', 'null' are handled. These values will be converted to their boolean equivalents.
__construct( string $path null , string $section null )
Build and construct a new ini file parser. The parser can be used to read ini files that are on the filesystem.
$path optional null $section optional null _getFilePath( string $key )
Get file path
$key string_parseNestedValues( array $values )
parses nested values out of keys.
$values array_value( mixed $val )
Converts a value into the ini equivalent
$val stringdump( string $key , array $data )
Dumps the state of Configure data into an ini formatted string.
$key $data integerConfigReaderInterface::dump() read( string $key )
Read an ini file and return the results as an array.
For backwards compatibility, acl.ini.php will be treated specially until 3.0.
$key arrayConfigureExceptionConfigReaderInterface::read()
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.7/class-IniReader.html