Interface

eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher

interface VersatileMatcher implements Matcher

Interface for SiteAccess matchers.

VersatileMatcher makes it possible to do a reverse match (e.g. "Is this matcher knows provided SiteAccess name?"). Versatile matchers enable cross-siteAccess linking.

Methods

setRequest(SimplifiedRequest $request)

Injects the request object to match against.

from Matcher
string|false match()

Returns matched Siteaccess or false if no siteaccess could be matched.

from Matcher
string getName()

Returns the matcher's name.

from Matcher
VersatileMatcher|null reverseMatch(string $siteAccessName)

Returns matcher object corresponding to $siteAccessName or null if non applicable.

SimplifiedRequest getRequest()

Returns the SimplifiedRequest object corresponding to the reverse match.

Details

in Matcher at line 23
public setRequest(SimplifiedRequest $request)

Injects the request object to match against.

Parameters

SimplifiedRequest $request

in Matcher at line 30
public string|false match()

Returns matched Siteaccess or false if no siteaccess could be matched.

Return Value

string|false

in Matcher at line 38
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 28
public VersatileMatcher|null reverseMatch(string $siteAccessName)

Returns matcher object corresponding to $siteAccessName or null if non applicable.

Note: VersatileMatcher objects always receive a request with cleaned up pathinfo (i.e. no SiteAccess part inside).

Parameters

string $siteAccessName

Return Value

VersatileMatcher|null Typically the current matcher, with updated request.

at line 38
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

See also

reverseMatch()