PHP Class Neos\Flow\Mvc\RequestMatcher

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
matchRequestProperty ( string $propertyName, string $expectedValue, integer $weight ) : boolean Compare a request propertyValue against an expected value and add the weight if it's TRUE

Method Details

__construct() public méthode

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

addWeight() public méthode

Add a weight to the total
public addWeight ( integer $weight ) : void
$weight integer
Résultat void

getMainRequest() public méthode

Get a new RequestMatcher for the Request's MainRequest
public getMainRequest ( ) : RequestMatcher
Résultat RequestMatcher

getParentRequest() public méthode

Get a new RequestMatcher for the Request's ParentRequest
public getParentRequest ( ) : RequestMatcher
Résultat RequestMatcher

getWeight() public méthode

Return the current weight for this match
public getWeight ( ) : integer
Résultat integer

isAction() public méthode

Check if the current Request's Action equals the argument
public isAction ( string $action ) : boolean
$action string
Résultat boolean

isController() public méthode

Check if the current Request's Controller equals the argument
public isController ( string $controller ) : boolean
$controller string
Résultat boolean

isFormat() public méthode

Check if the current Request's Format equals the argument
public isFormat ( string $format ) : boolean
$format string
Résultat boolean

isPackage() public méthode

Check if the current Request's Package equals the argument
public isPackage ( string $package ) : boolean
$package string
Résultat boolean

isSubPackage() public méthode

Check if the current Request's SubPackage equals the argument
public isSubPackage ( string $subPackage ) : boolean
$subPackage string
Résultat boolean

matchRequestProperty() protected méthode

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
Résultat boolean

resetWeight() public méthode

Reset the match weight
public resetWeight ( ) : void
Résultat void

Property Details

$parentMatcher protected_oe property

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
Résultat RequestMatcher

$request protected_oe property

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
Résultat ActionRequest

$weight protected_oe property

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
Résultat integer