public function evaluate(FlowQuery $flowQuery, array $arguments)
{
if (!isset($arguments[0]) || empty($arguments[0])) {
throw new FlowQueryException('property() does not support returning all attributes yet', 1332492263);
} else {
$context = $flowQuery->getContext();
$propertyPath = $arguments[0];
if (!isset($context[0])) {
return null;
}
$element = $context[0];
if ($propertyPath[0] === '_') {
return ObjectAccess::getPropertyPath($element, substr($propertyPath, 1));
} else {
return $element->getProperty($propertyPath);
}
}
}