public function process(IHttpContext $context, ActionWrapper $action)
 {
     try {
         $this->processNext($context, $action);
     } catch (FallbackException $fe) {
         $config = Config::getInstance();
         $fallbackAction = $config['actions'][$action[0]]['fallback'];
         $odin = Odin::getInstance();
         $odin->addAction($fallbackAction);
         Logger::debug('Caught Exception');
         return;
     }
 }
Example #2
0
 /**
  * Constructor
  * Whole dirty job
  * 
  * @param string Config file localization
  * @param IHttpContext Context
  * @access public
  */
 public function __construct($config, IHttpContext $context)
 {
     self::$instance = $this;
     //set_error_handler(array(new SimpleErrorHandler(), 'handle'));
     $this->context = $context;
     $this->sConfig = $config;
     $this->initialize($context);
     $this->data = $this->pluginManager->getPlugin('router')->getData($context);
     $result = $this->run();
     ob_start();
     $this->display($result);
     $this->stop();
     ob_end_flush();
 }