<?php
class Bootstrap extends Yaf_Bootstrap_Abstract
{
public function _initRedis(Yaf_Dispatcher $dispatcher)
{
$config = Yaf_Application::app()->getConfig()->redis;
$redis = new Redis();
$redis->connect($config->host, $config->port);
/* the connection is now available to the whole application */
Yaf_Registry::set("redis", $redis);
}
}
?>