class AbstractUrlGenerator

Properties

protected Application $app
protected RouteCollection $routes
protected string|null $path

Methods

__construct(Application $app, RouteCollection $routes)

No description

string
toRoute(string $name, array $parameters = [])

<p>Generate a URL to a named route.</p>

string
toPath(string $path)

<p>Generate a URL to a path.</p>

string
toBase()

<p>Get the base URL.</p>

Details

__construct(Application $app, RouteCollection $routes)

Parameters

Application $app
RouteCollection $routes

string toRoute(string $name, array $parameters = [])

<p>Generate a URL to a named route.</p>

Parameters

string $name
array $parameters

Return Value

string

string toPath(string $path)

<p>Generate a URL to a path.</p>

Parameters

string $path

Return Value

string

string toBase()

<p>Get the base URL.</p>

Return Value

string