コード例 #1
0
ファイル: Web.php プロジェクト: rganin/magelight
 /**
  * Run app
  *
  * @throws \Exception|\Magelight\Exception
  */
 public function run()
 {
     try {
         \Magelight\Event\Manager::getInstance()->dispatchEvent('app_start', []);
         $request = \Magelight\Http\Request::getInstance();
         $action = \Magelight\Components\Router::getInstance($this)->getAction((string) $request->getRequestRoute());
         $request->appendGet($action['arguments']);
         $this->dispatchAction($action);
     } catch (\Exception $e) {
         \Magelight\Log::getInstance()->add($e->getMessage());
         if ($this->developerMode) {
             throw $e;
         }
     }
 }