RouteUrlGenerator
class RouteUrlGenerator
Properties
protected | $url | The URL generator instance. |
|
protected Request | $request | The request instance. |
|
array | $defaultParameters | The named parameter defaults. |
|
array | $dontEncode | Characters that should not be URL encoded. |
Methods
Add the port to the domain if necessary.
Replace the parameters on the root path.
Replace all of the wildcard parameters for a route path.
Replace all of the named parameters in the path.
Add a query string to the URI.
Get the query string for a given route.
Get the string parameters from a given list.
Get the numeric parameters from a given list.
Set the default named parameters used by the URL generator.
Details
at line 61
void
__construct(UrlGenerator $url, Request $request)
Create a new Route URL generator.
at line 77
string
to(Route $route, array $parameters = [], bool $absolute = false)
Generate a URL for the given route.
at line 112
protected string
getRouteDomain(Route $route, array $parameters)
Get the formatted domain for a given route.
at line 124
protected string
formatDomain(Route $route, array $parameters)
Format the domain and port for the route and request.
at line 137
protected string
getRouteScheme(Route $route)
Get the scheme for the given route.
at line 154
protected string
addPortToDomain(string $domain)
Add the port to the domain if necessary.
at line 172
protected string
replaceRootParameters(Route $route, string $domain, array $parameters)
Replace the parameters on the root path.
at line 188
protected string
replaceRouteParameters(string $path, array $parameters)
Replace all of the wildcard parameters for a route path.
at line 208
protected string
replaceNamedParameters(string $path, array $parameters)
Replace all of the named parameters in the path.
at line 228
protected mixed|string
addQueryString(string $uri, array $parameters)
Add a query string to the URI.
at line 248
protected string
getRouteQueryString(array $parameters)
Get the query string for a given route.
at line 279
protected array
getStringParameters(array $parameters)
Get the string parameters from a given list.
at line 290
protected array
getNumericParameters(array $parameters)
Get the numeric parameters from a given list.
at line 301
void
defaults(array $defaults)
Set the default named parameters used by the URL generator.