PHP Class eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\URIElement

Inheritance: implements eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher, implements eZ\Publish\Core\MVC\Symfony\SiteAccess\URILexer
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( integer | array $elementNumber ) Constructor.
__sleep ( )
analyseLink ( string $linkUri ) : string Analyses $linkUri when generating a link to a route, in order to have the siteaccess part back in the URI.
analyseURI ( string $uri ) : string Analyses $uri and removes the siteaccess part, if needed.
getName ( )
getRequest ( ) : SimplifiedRequest
match ( ) : string | false Returns matching Siteaccess.
reverseMatch ( string $siteAccessName ) : URIElement | null Returns matcher object corresponding to $siteAccessName or null if non applicable.
setRequest ( SimplifiedRequest $request ) Injects the request object to match against.

Méthodes protégées

Méthode Description
getURIElements ( ) : array Returns URI elements as an array.

Method Details

__construct() public méthode

Constructor.
public __construct ( integer | array $elementNumber )
$elementNumber integer | array Number of elements to take into account.

__sleep() public méthode

public __sleep ( )

analyseURI() public méthode

Analyses $uri and removes the siteaccess part, if needed.
public analyseURI ( string $uri ) : string
$uri string The original URI
Résultat string The modified URI

getName() public méthode

public getName ( )

getRequest() public méthode

public getRequest ( ) : SimplifiedRequest
Résultat eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest

getURIElements() protected méthode

Returns URI elements as an array.
protected getURIElements ( ) : array
Résultat array

match() public méthode

Returns matching Siteaccess.
public match ( ) : string | false
Résultat string | false Siteaccess matched or false.

reverseMatch() public méthode

Limitation: If the element number is > 1, we cannot predict how URI segments are expected to be built. So we expect "_" will be reversed to "/" e.g. foo_bar => foo/bar with elementNumber == 2 Hence if number of elements is different than the element number, we report as non matched.
public reverseMatch ( string $siteAccessName ) : URIElement | null
$siteAccessName string
Résultat URIElement | null

setRequest() public méthode

Injects the request object to match against.
public setRequest ( SimplifiedRequest $request )
$request eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest