PHP Класс Neos\Flow\Mvc\Routing\DynamicRoutePart

Наследование: extends AbstractRoutePart, implements Neos\Flow\Mvc\Routing\DynamicRoutePartInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$splitString string If it is empty, Route Part will be equal to the remaining request path.

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

findValueToMatch() защищенный Метод

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
Результат string value to match, or an empty string if $routePath is empty or split string was not found

findValueToResolve() защищенный Метод

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.
Результат string | array value to resolve.

match() закрытый публичный Метод

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.
Результат boolean TRUE if Route Part matched $routePath, otherwise FALSE.

matchValue() защищенный Метод

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
Результат boolean TRUE if value could be matched successfully, otherwise FALSE.

removeMatchingPortionFromRequestPath() защищенный Метод

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
Результат void

resolve() закрытый публичный Метод

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.
Результат boolean TRUE if current Route Part could be resolved, otherwise FALSE

resolveValue() защищенный Метод

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
Результат boolean TRUE if value could be resolved successfully, otherwise FALSE.

setSplitString() публичный Метод

Sets split string of the Route Part.
public setSplitString ( string $splitString ) : void
$splitString string
Результат void

Описание свойств

$persistenceManager защищенное свойство

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Результат Neos\Flow\Persistence\PersistenceManagerInterface

$splitString защищенное свойство

If it is empty, Route Part will be equal to the remaining request path.
protected string $splitString
Результат string