(Yaf >=1.0.0)
Examples:
Yaf_Config_Ini() example

This example illustrates a basic use of Yaf_Config_Ini for loading configuration data from an INI file. In this example there are configuration data for both a production system and for a staging system. Because the staging system configuration data are very similar to those for production, the staging section inherits from the production section. In this case, the decision is arbitrary and could have been written conversely, with the production section inheriting from the staging section, though this may not be the case for more complex situations. Suppose, then, that the following configuration data are contained in /path/to/config.ini:

; Production site configuration data
[production]
webhost                  = www.example.com
database.adapter         = pdo_mysql
database.params.host     = db.example.com
database.params.username = dbuser
database.params.password = secret
database.params.dbname   = dbname
 
; Staging site configuration data inherits from production and
; overrides values as necessary
[staging : production]
database.params.host     = dev.example.com
database.params.username = devuser
database.params.password = devsecret
<?php
$config = new Yaf_Config_Ini('/path/to/config.ini', 'staging');
 
var_dump($config->database->params->host); 
var_dump($config->database->params->dbname);
var_dump($config->get("database.params.username"));
?>

The above example will output something similar to:

string(15) "dev.example.com"
string(6) "dbname"
string(7) "devuser
Yaf_Config_Ini::toArray

(Yaf >=1.0.0) Returns a PHP array public array

2016-02-24 16:07:23
Yaf_Config_Ini::valid

(Yaf >=1.0.0) The valid purpose public void

2016-02-24 16:07:23
Yaf_Config_Ini::key

(Yaf >=1.0.0) The key purpose public void

2016-02-24 16:07:22
Yaf_Config_Ini::__get

(Yaf >=1.0.0) The __get purpose public void

2016-02-24 16:07:22
Yaf_Config_Ini::next

(Yaf >=1.0.0) The next purpose public void

2016-02-24 16:07:22
Yaf_Config_Ini::rewind

(Yaf >=1.0.0) The rewind purpose public void

2016-02-24 16:07:23
Yaf_Config_Ini::__set

(Yaf >=1.0.0) The __set purpose public void

2016-02-24 16:07:23
Yaf_Config_Ini::current

(Yaf >=1.0.0) The current purpose public void

2016-02-24 16:07:22
Yaf_Config_Ini::count

(Yaf >=1.0.0) The count purpose public void

2016-02-24 16:07:22
Yaf_Config_Ini::__isset

(Yaf >=1.0.0) The __isset purpose public void

2016-02-24 16:07:22