Ejemplo n.º 1
0
 /**
  * Read any defined route patterns from metadata and inject them into the router
  * @param Router $router
  */
 public function registerRoutes(Router $router)
 {
     foreach ($this->metaDataDriver->getAllClassNames() as $class) {
         $classMetaData = $this->getMetaDataForClass($class);
         $router->registerRoutes($classMetaData->getRoutesMetaData());
     }
 }
Ejemplo n.º 2
0
 /**
  * Get all possible match routes for this request
  * @param  boolean $matchVerb - Whether you want to match the route using the request HTTP verb
  * @return array   of Drest\Mapping\RouteMetaData object
  */
 protected function getMatchedRoutes($matchVerb = true)
 {
     return $this->router->getMatchedRoutes($this->request, (bool) $matchVerb);
 }