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
Datei anzeigen Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$shortName string

Public Methods

Method Description
evaluate ( FlowQuery $flowQuery, array $arguments ) : void

Protected Methods

Method 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 method

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)
return void

evaluateOperator() protected method

Evaluate an operator
protected evaluateOperator ( mixed $value, string $operator, mixed $operand ) : boolean
$value mixed
$operator string
$operand mixed
return boolean

getPropertyPath() protected method

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
return mixed

handleSimpleTypeOperand() protected method

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

matchesAttributeFilter() protected method

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

matchesFilter() protected method

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
return boolean TRUE if $element matches filter, FALSE otherwise

matchesFilterGroup() protected method

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

matchesIdentifierFilter() protected method

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

matchesPropertyNameFilter() protected method

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

operandIsSimpleType() protected method

protected operandIsSimpleType ( string $type ) : boolean
$type string
return 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
return Neos\Flow\Persistence\PersistenceManagerInterface

$shortName protected_oe static_oe property

protected static string $shortName
return string