Here is an example of a Bootstrap loading a session class then loading a database class and using a db configuration from the application config.
<?php
class Bootstrap extends Yaf_Bootstrap_Abstract
{
public function _initSession(Yaf_Dispatcher $dispatcher)
{
$session = new Vendor\Session();
$session->start();
}
public function _initDatabase(Yaf_Dispatcher $dispatcher)
{
$config = Yaf_Application::app()->getConfig()->application->database;
Yaf_Registry::set('db', Vendor\Database($config));
}
}
?>