Class

eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound

abstract class Compound implements CompoundInterface, URILexer

Base for Compound siteaccess matchers.

All classes extending this one must implement a NAME class constant.

Methods

__construct(array $config)

setMatcherBuilder(MatcherBuilderInterface $matcherBuilder)

Injects the matcher builder, to allow the Compound matcher to properly build the underlying matchers.

setRequest(SimplifiedRequest $request)

SimplifiedRequest getRequest()

Returns the SimplifiedRequest object corresponding to the reverse match.

string analyseURI(string $uri)

Analyses $uri and removes the siteaccess part, if needed.

string analyseLink(string $linkUri)

Analyses $linkUri when generating a link to a route, in order to have the siteaccess part back in the URI.

Matcher[] getSubMatchers()

Returns all used sub-matchers.

setSubMatchers(array $subMatchers)

Replaces sub-matchers.

string getName()

Returns the matcher's name.

__sleep()

Serialization occurs when serializing the siteaccess for subrequests.

Details

at line 50
public __construct(array $config)

Parameters

array $config

at line 56
public setMatcherBuilder(MatcherBuilderInterface $matcherBuilder)

Injects the matcher builder, to allow the Compound matcher to properly build the underlying matchers.

Parameters

MatcherBuilderInterface $matcherBuilder

at line 66
public setRequest(SimplifiedRequest $request)

Parameters

SimplifiedRequest $request

at line 76
public SimplifiedRequest getRequest()

Returns the SimplifiedRequest object corresponding to the reverse match.

This request object can then be used to build a link to the "reverse matched" SiteAccess.

Return Value

SimplifiedRequest

at line 81
public string analyseURI(string $uri)

Analyses $uri and removes the siteaccess part, if needed.

Parameters

string $uri The original URI

Return Value

string The modified URI

Analyses $linkUri when generating a link to a route, in order to have the siteaccess part back in the URI.

Parameters

string $linkUri

Return Value

string The modified link URI

at line 103
public Matcher[] getSubMatchers()

Returns all used sub-matchers.

Return Value

Matcher[]

at line 108
public setSubMatchers(array $subMatchers)

Replaces sub-matchers.

Parameters

array $subMatchers

at line 119
public string getName()

Returns the matcher's name.

This information will be stored in the SiteAccess object itself to quickly be able to identify the matcher type.

Return Value

string

at line 135
public __sleep()

Serialization occurs when serializing the siteaccess for subrequests.

See also

\eZ\Bundle\EzPublishCoreBundle\Fragment\FragmentUriGenerator::generateFragmentUri()