Exemplo n.º 1
0
 public static function bootstrap()
 {
     //Make sure orm is loaded first as we need this
     \Fuel\Core\Package::load('orm');
     //For fuel v1 add to the finder path
     if (class_exists('\\Fuel\\Core\\Finder')) {
         \Fuel\Core\Finder::instance()->add_path(__DIR__ . DS . '..' . DS . '..');
     }
     \Fuel\Core\Config::load('ethanol', true);
     \Fuel\Core\Config::load('ethanol_permissions', true);
     \Fuel\Core\Lang::load('ethanol', 'ethanol');
     Auth::instance()->register_driver(array('database', 'facebook'));
 }
Exemplo n.º 2
0
 public static function routes()
 {
     $route = '_status';
     Router::add($route, new Route($route, function ($request) {
         // ignore this transaction
         Transaction::ignore();
         // load a config
         $conf = Config::load('newrelic-ping');
         // ping the urls
         $pinger = new Pinger($conf['urls'], $conf['base_host']);
         $res = $pinger->ping();
         // add path to lookup view
         Finder::instance()->add_path(realpath(rtrim(__DIR__, '/') . '/../'));
         // build a response and return it
         return new Response(View::forge('_newrelic-status', ['result' => $res]), $res->getResultStatusCode());
     }));
 }
Exemplo n.º 3
0
<?php

//Make sure orm is loaded first as we need this
\Fuel\Core\Package::load('orm');
//For fuel v1 add to the finder path
if (class_exists('\\Finder')) {
    \Fuel\Core\Finder::instance()->add_path(__DIR__ . DS . '..' . DS . '..');
}
\Fuel\Core\Config::load('ethanol', true);
\Fuel\Core\Config::load('ethanol_permissions', true);
\Fuel\Core\Lang::load('ethanol', 'ethanol');
Ethanol\Auth::instance()->register_driver(array('database', 'facebook'));