PHP Class Neos\Flow\Mvc\Routing\DynamicRoutePart

Inheritance: extends AbstractRoutePart, implements Neos\Flow\Mvc\Routing\DynamicRoutePartInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$splitString string If it is empty, Route Part will be equal to the remaining request path.

Méthodes publiques

Méthode Description
match ( string &$routePath ) : boolean Checks whether this Dynamic Route Part corresponds to the given $routePath.
resolve ( array &$routeValues ) : boolean Checks whether $routeValues contains elements which correspond to this Dynamic Route Part.
setSplitString ( string $splitString ) : void Sets split string of the Route Part.

Méthodes protégées

Méthode Description
findValueToMatch ( string $routePath ) : string Returns the first part of $routePath.
findValueToResolve ( array $routeValues ) : string | array Returns the route value of the current route part.
matchValue ( string $value ) : boolean Checks, whether given value can be matched.
removeMatchingPortionFromRequestPath ( string &$routePath, string $valueToMatch ) : void Removes matching part from $routePath.
resolveValue ( mixed $value ) : boolean Checks, whether given value can be resolved and if so, sets $this->value to the resolved value.

Method Details

findValueToMatch() protected méthode

If a split string is set, only the first part of the value until location of the splitString is returned. This method can be overridden by custom RoutePartHandlers to implement custom matching mechanisms.
protected findValueToMatch ( string $routePath ) : string
$routePath string The request path to be matched
Résultat string value to match, or an empty string if $routePath is empty or split string was not found

findValueToResolve() protected méthode

This method can be overridden by custom RoutePartHandlers to implement custom resolving mechanisms.
protected findValueToResolve ( array $routeValues ) : string | array
$routeValues array An array with key/value pairs to be resolved by Dynamic Route Parts.
Résultat string | array value to resolve.

match() final public méthode

On successful match this method sets $this->value to the corresponding uriPart and shortens $routePath respectively.
final public match ( string &$routePath ) : boolean
$routePath string The request path to be matched - without query parameters, host and fragment.
Résultat boolean TRUE if Route Part matched $routePath, otherwise FALSE.

matchValue() protected méthode

In the case of default Dynamic Route Parts a value matches when it's not empty. This method can be overridden by custom RoutePartHandlers to implement custom matching mechanisms.
protected matchValue ( string $value ) : boolean
$value string value to match
Résultat boolean TRUE if value could be matched successfully, otherwise FALSE.

removeMatchingPortionFromRequestPath() protected méthode

This method can be overridden by custom RoutePartHandlers to implement custom matching mechanisms.
protected removeMatchingPortionFromRequestPath ( string &$routePath, string $valueToMatch ) : void
$routePath string The request path to be matched
$valueToMatch string The matching value
Résultat void

resolve() final public méthode

If a corresponding element is found in $routeValues, this element is removed from the array.
final public resolve ( array &$routeValues ) : boolean
$routeValues array An array with key/value pairs to be resolved by Dynamic Route Parts.
Résultat boolean TRUE if current Route Part could be resolved, otherwise FALSE

resolveValue() protected méthode

If $value is empty, this method checks whether a default value exists. This method can be overridden by custom RoutePartHandlers to implement custom resolving mechanisms.
protected resolveValue ( mixed $value ) : boolean
$value mixed value to resolve
Résultat boolean TRUE if value could be resolved successfully, otherwise FALSE.

setSplitString() public méthode

Sets split string of the Route Part.
public setSplitString ( string $splitString ) : void
$splitString string
Résultat void

Property Details

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Résultat Neos\Flow\Persistence\PersistenceManagerInterface

$splitString protected_oe property

If it is empty, Route Part will be equal to the remaining request path.
protected string $splitString
Résultat string