Beispiel #1
0
 public function __construct()
 {
     $this->_cache = \DF\Cache::getCache('doctrine');
 }
Beispiel #2
0
    } catch (\Exception $e) {
        throw new \DF\Exception\Bootstrap($e->getMessage());
    }
});
// InfluxDB
$di->setShared('influx', function () use($config) {
    $opts = $config->influx->toArray();
    return new \PVL\Service\InfluxDb($opts);
});
// Auth and ACL
$di->setShared('auth', '\\DF\\Auth\\Model');
$di->setShared('acl', '\\PVL\\Acl\\Instance');
$di->setShared('cache', '\\DF\\Cache');
// Register URL handler.
$di->set('url', function () use($config) {
    $url = new \Phalcon\Mvc\Url();
    $url->setBaseUri('/');
    $url->setStaticBaseUri('/static/');
    return $url;
});
// Set Session handler.
$session_pool = \DF\Cache::getCache('session');
if (!$session_pool->getDriver() instanceof \Stash\Driver\Ephemeral) {
    $session = new \Stash\Session($session_pool);
    \Stash\Session::registerHandler($session);
}
// Register view helpers.
$di->setShared('viewHelper', '\\DF\\Phalcon\\Service\\ViewHelper');
// PVL-specific customization.
$system_tz = \PVL\Customization::get('timezone');
@date_default_timezone_set($system_tz);