public static function create(RouteCollection $routes, ?string $prefix = null): self
    {
        $uriFactory = new UriFactory();

        return new self($routes, $uriFactory, $prefix);
    }
public static function create(RouteCollection $routes, ?string $prefix = null): self
    {
        $uriFactory = new UriFactory();

        return new self($routes, $uriFactory, $prefix);
    }
public static function create ( RouteCollection $ routes , ? string $ prefix = null ) : self { $ uriFactory = new UriFactory ( ) ; return new self ( $ routes , $ uriFactory , $ prefix ) ; }
Creates new URI generator.

@param RouteCollection $routes
@param null|string $prefix
@return UriGenerator
Creates new URI generator .