Example #1
0
 /**
  * Run method
  * @return string HTML
  */
 public function run()
 {
     Logger::log('Begin runner');
     try {
         if ($this->config->isConfigured()) {
             if (!$this->parser->isFile()) {
                 return $this->router->execute($this->actualUri);
             }
         } else {
             return ConfigController::getInstance()->config();
         }
     } catch (ConfigException $c) {
         return $this->dumpException($c);
     } catch (SecurityException $s) {
         return $this->security->notAuthorized($this->actualUri);
     } catch (UserAuthException $u) {
         $this->redirectToHome();
     } catch (RouterException $r) {
         return $this->router->httpNotFound($r);
     } catch (\Exception $e) {
         return $this->dumpException($e);
     }
 }