Example #1
0
 /**
  * Process Route
  * @return \Wrr\Response\AbstractResponse
  * @throws \RunTimeException
  */
 public function route()
 {
     if ($this->getUriBase()) {
         $this->request->setUriBase($this->getUriBase());
     }
     foreach ($this->routes as $route) {
         /* @var \Wrr\RouteInterface $route */
         if ($route->match($this->request)) {
             return $route->route();
         }
     }
     throw new \RuntimeException('Resource Not Found', 404);
 }