class RouteUrlResolver implements UrlResolverInterface (View source)

deprecated Use RouterUrlResolver instead.

Class RouteUrlResolver.

\@package Concrete\Core\Url\Resolver

Properties

protected $generator
protected $routeList
protected $pathUrlResolver

Methods

__construct(UrlResolverInterface $path_url_resolver, UrlGeneratorInterface $generator, RouteCollection $route_list)

No description

UrlGeneratorInterface
getGenerator()

No description

RouteCollection
getRouteList()

No description

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

Resolve urls from the list of registered routes takes a string.

Details

__construct(UrlResolverInterface $path_url_resolver, UrlGeneratorInterface $generator, RouteCollection $route_list)

No description

Parameters

UrlResolverInterface $path_url_resolver
UrlGeneratorInterface $generator
RouteCollection $route_list

UrlGeneratorInterface getGenerator()

No description

Return Value

UrlGeneratorInterface

RouteCollection getRouteList()

No description

Return Value

RouteCollection

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

Resolve urls from the list of registered routes takes a string.

[code] $url = \URL::to('route/user_route', array('id' => 1)); [/code]

OR

[code] // Register a route $route_list->register('/users/{id}', '\My\Application\User\Controller::view', 'user_route');

// Create a resolver $route_url_resolver = new \Concrete\Core\Url\Resolver\RouteUrlResolver($generator, $route_list);

// Retrieve the URL $url = $route_url_resolver->resolve(array('route/user_route', array('id' => 1))); [/code]

Parameters

array $arguments

A list of the arguments

URLInterface $resolved

Return Value

URLInterface