PHP Класс Neos\Flow\Mvc\RequestMatcher

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$parentMatcher RequestMatcher This property is set if parentRequest or mainRequest is used. The main purpose is to properly track the weight of the parentRequest and mainRequest Matchers through the addWeight method
$request ActionRequest If the Request is NULL this class will always return FALSE. This case is primarily needed if no parentRequest exists.
$weight integer The weight is a value that's added up through various matching functions in here. This is needed to have a way to determine, how specific a configuration Method is because that's how the configuration will be sorted.

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

Метод Описание
__construct ( ActionRequest $actionRequest = null, RequestMatcher $parentMatcher = null )
addWeight ( integer $weight ) : void Add a weight to the total
getMainRequest ( ) : RequestMatcher Get a new RequestMatcher for the Request's MainRequest
getParentRequest ( ) : RequestMatcher Get a new RequestMatcher for the Request's ParentRequest
getWeight ( ) : integer Return the current weight for this match
isAction ( string $action ) : boolean Check if the current Request's Action equals the argument
isController ( string $controller ) : boolean Check if the current Request's Controller equals the argument
isFormat ( string $format ) : boolean Check if the current Request's Format equals the argument
isPackage ( string $package ) : boolean Check if the current Request's Package equals the argument
isSubPackage ( string $subPackage ) : boolean Check if the current Request's SubPackage equals the argument
resetWeight ( ) : void Reset the match weight

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

Метод Описание
matchRequestProperty ( string $propertyName, string $expectedValue, integer $weight ) : boolean Compare a request propertyValue against an expected value and add the weight if it's TRUE

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

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

public __construct ( ActionRequest $actionRequest = null, RequestMatcher $parentMatcher = null )
$actionRequest ActionRequest
$parentMatcher RequestMatcher

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

Add a weight to the total
public addWeight ( integer $weight ) : void
$weight integer
Результат void

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

Get a new RequestMatcher for the Request's MainRequest
public getMainRequest ( ) : RequestMatcher
Результат RequestMatcher

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

Get a new RequestMatcher for the Request's ParentRequest
public getParentRequest ( ) : RequestMatcher
Результат RequestMatcher

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

Return the current weight for this match
public getWeight ( ) : integer
Результат integer

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

Check if the current Request's Action equals the argument
public isAction ( string $action ) : boolean
$action string
Результат boolean

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

Check if the current Request's Controller equals the argument
public isController ( string $controller ) : boolean
$controller string
Результат boolean

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

Check if the current Request's Format equals the argument
public isFormat ( string $format ) : boolean
$format string
Результат boolean

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

Check if the current Request's Package equals the argument
public isPackage ( string $package ) : boolean
$package string
Результат boolean

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

Check if the current Request's SubPackage equals the argument
public isSubPackage ( string $subPackage ) : boolean
$subPackage string
Результат boolean

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

Compare a request propertyValue against an expected value and add the weight if it's TRUE
protected matchRequestProperty ( string $propertyName, string $expectedValue, integer $weight ) : boolean
$propertyName string
$expectedValue string
$weight integer
Результат boolean

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

Reset the match weight
public resetWeight ( ) : void
Результат void

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

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

This property is set if parentRequest or mainRequest is used. The main purpose is to properly track the weight of the parentRequest and mainRequest Matchers through the addWeight method
protected RequestMatcher,Neos\Flow\Mvc $parentMatcher
Результат RequestMatcher

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

If the Request is NULL this class will always return FALSE. This case is primarily needed if no parentRequest exists.
protected ActionRequest,Neos\Flow\Mvc $request
Результат ActionRequest

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

The weight is a value that's added up through various matching functions in here. This is needed to have a way to determine, how specific a configuration Method is because that's how the configuration will be sorted.
protected int $weight
Результат integer