Esempio n. 1
0
 function __construct(Config $config, Context $context)
 {
     error_reporting(null);
     ini_set("display_errors", false);
     $this->context = $context;
     $this->registerExceptionHandler();
     $context->bind(Config::class, $config);
     $this->init();
     $config->parseDir(path('root'), $this);
 }
Esempio n. 2
0
 function __construct(Config $config, Context $context)
 {
     error_reporting(E_ALL);
     ini_set("display_errors", "1");
     $this->context = $context;
     $this->registerExceptionHandler();
     $context->bind(DebugBar::class, $this->debugBar = new StandardDebugBar());
     $this->debugBar->setStorage(new FileStorage('/tmp/debugbar_storage'));
     $context->bind(Config::class, $config);
     $this->init();
     $config->parseDir(path('root'));
     if (isHttp() && !implicitDev()) {
         die('Unauthorized for dev!');
     }
 }
Esempio n. 3
0
/**
 * @return Context
 * @throws Exception
 */
function context()
{
    return Context::getInstance();
}