PHP 8.5.0 Alpha 4 available for testing

Voting

: min(five, four)?
(Example: nine)

The Note You're Voting On

brandon at brandonlamb dot com
13 years ago
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));
}
}
?>

<< Back to user notes page

To Top