Exemplo n.º 1
0
 public function run()
 {
     $matched = $this->_router->parse();
     try {
         if (empty($matched)) {
             throw new HttpNotFoundException('请求的页面不存在');
         }
         foreach ($matched as $router) {
             $router->execute($this->getRequest(), $this->getResponse());
         }
     } catch (HttpNotFoundException $e) {
         $this->getNotFoundRouter()->execute($this->getRequest(), $this->getResponse(), $e->getMessage());
     }
     $this->getResponse()->output();
 }