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); }
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!'); } }
/** * @return Context * @throws Exception */ function context() { return Context::getInstance(); }