private function runError(\Exception $e) { try { $request = new Request(); $request->setProperty('app_error', $e); $request->setProperty('controller', 'error'); $request->setProperty('action', 'index'); RequestRegistry::setRequest($request); $cmdResolver = new CommandResolver(); $cmd = $cmdResolver->getCmd($request); $cmd->execute(); } catch (\Exception $e) { echo $e->getMessage(); exit; } }
public function __construct() { $this->init(); RequestRegistry::setRequest($this); }