Ejemplo n.º 1
0
 public function addRoute(RouterEntry $route)
 {
     if ($route instanceof RouterRoute && stripos($route->getCallback(), '@') !== false) {
         $this->controllerUrlMap[$route->getCallback()] = $route;
     } else {
         if ($route instanceof RouterController) {
             $this->controllerUrlMap[$route->getController()] = $route;
         } else {
             if ($route instanceof RouterGroup) {
                 $this->renderRoute($route);
             }
         }
     }
     if ($this->currentRoute !== null) {
         $this->backstack[] = $route;
     } else {
         $this->routes[] = $route;
     }
 }