<?php
/**
* Assume /etc/myapp/application.ini contains:
* [common]
* application.name = "MyApp"
* database.host = "localhost"
* database.port = 3306
*
* [production : common]
* log.level = "warning"
*/
// Load only the "production" section, which inherits from "common"
$config = new Yaf_Config_Ini('/etc/myapp/application.ini', 'production');
echo $config->application->name, "\n";
echo $config->database->host, "\n";
echo $config->log->level, "\n";
?>
The above example will output
something similar to: