Esempio n. 1
0
 /**
  * run
  * execute or running the application.
  */
 public function run()
 {
     $this->dispatcher->dispatch(Http\Request::createFromGlobals(), Configure::read('url_suffix'));
     $handler = $this->dispatcher->fetchHandler();
     if (empty($handler)) {
         throw new Exception('handler does not found');
     }
     try {
         $reflection = new ReflectionFunction($handler);
         $output = $reflection->invoke($this->dispatcher->fetchParams());
         $this->response->send($output);
     } catch (ReflectionException $e) {
         Debugger::handleException($e);
     }
 }