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

VersatileMatcher makes it possible to do a reverse match (e.g. "Is this matcher knows provided SiteAccess name?"). Versatile matchers enable cross-siteAccess linking.
Inheritance: extends eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher
Show file Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
getRequest ( ) : SimplifiedRequest Returns the SimplifiedRequest object corresponding to the reverse match.
reverseMatch ( string $siteAccessName ) : eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher | null Returns matcher object corresponding to $siteAccessName or null if non applicable.

Method Details

getRequest() public method

This request object can then be used to build a link to the "reverse matched" SiteAccess.
See also: reverseMatch()
public getRequest ( ) : SimplifiedRequest
return eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest

reverseMatch() public method

Note: VersatileMatcher objects always receive a request with cleaned up pathinfo (i.e. no SiteAccess part inside).
public reverseMatch ( string $siteAccessName ) : eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher | null
$siteAccessName string
return eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher | null Typically the current matcher, with updated request.