class PathUrlResolver implements UrlResolverInterface, ApplicationAwareInterface (View source)

Traits

Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface

Properties

protected Application $app from ApplicationAwareTrait
protected Repository $config
protected CanonicalUrlResolver $canonical
protected Dashboard $dashboard

Methods

setApplication(Application $app)

Setter method for the application

__construct(Repository $repository, CanonicalUrlResolver $canonical_resolver, Dashboard $dashboard)

PathUrlResolver constructor.

URLInterface
resolve(array $arguments, URLInterface $resolved = null)

Resolve url's from any type of input.

handlePath(UrlInterface $url, $path, $args)

No description

basePath($url, $path, $args)

No description

Details

setApplication(Application $app)

Setter method for the application

Parameters

Application $app

__construct(Repository $repository, CanonicalUrlResolver $canonical_resolver, Dashboard $dashboard)

PathUrlResolver constructor.

Parameters

Repository $repository
CanonicalUrlResolver $canonical_resolver
Dashboard $dashboard

URLInterface resolve(array $arguments, URLInterface $resolved = null)

Resolve url's from any type of input.

This method MUST either return a \League\URL\URL when a url is resolved or null when a url cannot be resolved.

If the arguments list contains a page object, we will use that to determine the canonical URL

Parameters

array $arguments A list of the arguments
URLInterface $resolved

Return Value

URLInterface

protected handlePath(UrlInterface $url, $path, $args)

Parameters

UrlInterface $url
$path
$args

protected basePath($url, $path, $args)

Parameters

$url
$path
$args