public function add($path, $handler)
    {
        $route             = new Route($path, $handler);
        $this->routes[]    = $route;
        $this->nameCache   = [];
        $this->routeParser = new RouteParser;

        return $route;
    }
public function add($path, $handler)
    {
        $route             = new Route($path, $handler);
        $this->routes[]    = $route;
        $this->nameCache   = [];
        $this->routeParser = new RouteParser;

        return $route;
    }
public function add ( $ path , $ handler ) { $ route = new Route ( $ path , $ handler ) ; $ this -> routes [ ] = $ route ; $ this -> nameCache = [ ] ; $ this -> routeParser = new RouteParser ; return $ route ; }
Adds a route to the map and resets the name cache.

@param string   $path
@param callable $handler
@return Route
Adds a route to the map and resets the name cache .