/** * {@inheritdoc} */ public function init() { parent::init(); set_error_handler(['Cawa\\Error\\Handler', 'errorHandler']); set_exception_handler([__CLASS__, 'exceptionHandler']); self::$application = new Application(); self::$application->setAutoExit(false); }
/** * Load route & request */ public function init() { parent::init(); self::request()->fillFromGlobals(); if (file_exists($this->getAppRoot() . '/config/route.php')) { self::router()->addRoutes(require $this->getAppRoot() . '/config/route.php'); } if (file_exists($this->getAppRoot() . '/config/uri.php')) { self::router()->addUris(require $this->getAppRoot() . '/config/uri.php'); } }