Esempio n. 1
0
 /**
  * Add Routes
  *
  * @param array $routes            
  */
 public function addRoutes($routes)
 {
     foreach ($routes as $route => $path) {
         $method = "any";
         if (strpos($path, "@") !== false) {
             list($path, $method) = explode("@", $path);
         }
         $func = $this->processCallback($path);
         $r = new Route($route, $func);
         $r->setHttpMethods(strtoupper($method));
         array_push($this->routes, $r);
     }
 }