PHP Class Neos\Eel\FlowQuery\Operations\Object\FilterOperation

A filter expression is written in Fizzle, a grammar inspired by CSS selectors. It has the form "[" [] "]" and supports the following operators: = Strict equality of value and operand != Strict inequality of value and operand < Value is less than operand <= Value is less than or equal to operand > Value is greater than operand >= Value is greater than or equal to operand $= Value ends with operand (string-based) ^= Value starts with operand (string-based) *= Value contains operand (string-based) instanceof Checks if the value is an instance of the operand !instanceof Checks if the value is not an instance of the operand For the latter the behavior is as follows: if the operand is one of the strings object, array, int(eger), float, double, bool(ean) or string the value is checked for being of the specified type. For any other strings the value is used as classname with the PHP instanceof operation to check if the value matches.
Inheritance: extends Neos\Eel\FlowQuery\Operations\AbstractOperation
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$shortName string

Méthodes publiques

Méthode Description
evaluate ( FlowQuery $flowQuery, array $arguments ) : void

Méthodes protégées

Méthode Description
evaluateOperator ( mixed $value, string $operator, mixed $operand ) : boolean Evaluate an operator
getPropertyPath ( object $element, string $propertyPath ) : mixed Evaluate a property path. This is outsourced to a single method to make overriding this functionality easy.
handleSimpleTypeOperand ( string $operand, string $value ) : boolean
matchesAttributeFilter ( mixed $element, array $attributeFilter ) : boolean Match a single attribute filter
matchesFilter ( object $element, string $filter ) : boolean Match a single filter, i.e. [foo]. It matches only if all filter parts match.
matchesFilterGroup ( object $element, array $parsedFilter ) : boolean Evaluate Filter Group. An element matches the filter group if it matches at least one part of the filter group.
matchesIdentifierFilter ( object $element, string $identifier ) : boolean Filter the object by its identifier (UUID)
matchesPropertyNameFilter ( object $element, string $propertyNameFilter ) : boolean For generic objects, we do not support property name filters.
operandIsSimpleType ( string $type ) : boolean

Method Details

evaluate() public méthode

public evaluate ( FlowQuery $flowQuery, array $arguments ) : void
$flowQuery Neos\Eel\FlowQuery\FlowQuery the FlowQuery object
$arguments array the filter expression to use (in index 0)
Résultat void

evaluateOperator() protected méthode

Evaluate an operator
protected evaluateOperator ( mixed $value, string $operator, mixed $operand ) : boolean
$value mixed
$operator string
$operand mixed
Résultat boolean

getPropertyPath() protected méthode

Evaluate a property path. This is outsourced to a single method to make overriding this functionality easy.
protected getPropertyPath ( object $element, string $propertyPath ) : mixed
$element object
$propertyPath string
Résultat mixed

handleSimpleTypeOperand() protected méthode

protected handleSimpleTypeOperand ( string $operand, string $value ) : boolean
$operand string
$value string
Résultat boolean TRUE if $value is of type $operand; FALSE otherwise

matchesAttributeFilter() protected méthode

Match a single attribute filter
protected matchesAttributeFilter ( mixed $element, array $attributeFilter ) : boolean
$element mixed
$attributeFilter array
Résultat boolean

matchesFilter() protected méthode

Match a single filter, i.e. [foo]. It matches only if all filter parts match.
protected matchesFilter ( object $element, string $filter ) : boolean
$element object
$filter string
Résultat boolean TRUE if $element matches filter, FALSE otherwise

matchesFilterGroup() protected méthode

Filter Group is something like "[foo], [bar]"
protected matchesFilterGroup ( object $element, array $parsedFilter ) : boolean
$element object
$parsedFilter array
Résultat boolean TRUE if $element matches filter group, FALSE otherwise

matchesIdentifierFilter() protected méthode

Filter the object by its identifier (UUID)
protected matchesIdentifierFilter ( object $element, string $identifier ) : boolean
$element object
$identifier string
Résultat boolean

matchesPropertyNameFilter() protected méthode

For generic objects, we do not support property name filters.
protected matchesPropertyNameFilter ( object $element, string $propertyNameFilter ) : boolean
$element object
$propertyNameFilter string
Résultat boolean

operandIsSimpleType() protected méthode

protected operandIsSimpleType ( string $type ) : boolean
$type string
Résultat boolean TRUE if operand is a simple type (object, array, string, ...); i.e. everything which is NOT a class name

Property Details

$persistenceManager protected_oe property

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

$shortName protected_oe static_oe property

protected static string $shortName
Résultat string