Example #1
0
 /**
  * Returns an instance of the router instantiated
  * with the optional $routes.
  * @param  array  $routes (optional)
  * @return UrlRoute
  */
 public static function factory($routes = array())
 {
     $router = new self();
     if (count($routes)) {
         $router->addRoutes($routes);
     }
     return $router;
 }