\Thelia\RoutingTheliaMatcherCollection

Collection of Matcher.

Matcher resolve request into controller::method exemple of Matcher : UrlMatcher of HttpKernel component (but it implements UrlMatcherInterface and not RequestMatcherInterface.

Summary

Methods
Properties
Constants
__construct()
add()
getSortedMatchers()
sortMatchers()
matchRequest()
setContext()
getContext()
No public properties found
No constants found
No protected methods found
$context
$matchers
$defaultMatcher
$sortedMatchers
N/A
No private methods found
No private properties found
N/A

Properties

$context

$context

$matchers

$matchers

$defaultMatcher

$defaultMatcher

$sortedMatchers

$sortedMatchers

Methods

__construct()

__construct()

Constructor

Check if this constructor is needed (is RequestContext needed ? )

add()

add(\Symfony\Component\Routing\Matcher\RequestMatcherInterface $matcher, int $priority)

allow to add a matcher routing class to the matchers collection matcher must implement RequestMatcherInterface

priority can be fixed with $priority parameter

Parameters

\Symfony\Component\Routing\Matcher\RequestMatcherInterface $matcher
int $priority

set the priority of the added matcher

getSortedMatchers()

getSortedMatchers() : array

Sort Matchers by priority

Returns

array —

Array of matchers sorted by priority.

sortMatchers()

sortMatchers() : array

Sort the matcher by priority

Returns

array —

Array of matchers sorted by priority.

matchRequest()

matchRequest(\Symfony\Component\HttpFoundation\Request $request) : array

Tries to match a request with a set of routes.

If the matcher can not find information, it must throw one of the exceptions documented below.

Parameters

\Symfony\Component\HttpFoundation\Request $request

The request to match

Throws

\Symfony\Component\Routing\Exception\ResourceNotFoundException

If no matching resource could be found

\Symfony\Component\Routing\Exception\MethodNotAllowedException

If a matching resource was found but the request method is not allowed

Returns

array —

An array of parameters

setContext()

setContext(\Symfony\Component\Routing\RequestContext $context)

Sets the request context.

Parameters

\Symfony\Component\Routing\RequestContext $context

The context

getContext()

getContext() : \Symfony\Component\Routing\RequestContext

Gets the request context.

Returns

\Symfony\Component\Routing\RequestContext —

The context