Neos\Eel\FlowQuery\Operations\Object\PropertyOperation::evaluate PHP Метод

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

public evaluate ( FlowQuery $flowQuery, array $arguments ) : mixed
$flowQuery Neos\Eel\FlowQuery\FlowQuery the FlowQuery object
$arguments array the property path to use (in index 0)
Результат mixed
    public function evaluate(FlowQuery $flowQuery, array $arguments)
    {
        if (!isset($arguments[0]) || empty($arguments[0])) {
            throw new FlowQueryException('property() must be given an attribute name when used on objects, fetching all attributes is not supported.', 1332492263);
        } else {
            $context = $flowQuery->getContext();
            if (!isset($context[0])) {
                return null;
            }
            $element = $context[0];
            $propertyPath = $arguments[0];
            return ObjectAccess::getPropertyPath($element, $propertyPath);
        }
    }
PropertyOperation