GetOperation
class GetOperation extends AbstractOperation (View source)
Get a (non-wrapped) element from the context.
If FlowQuery is used, the result is always another FlowQuery. In case you need to pass a FlowQuery result (and lazy evaluation does not work out) you can use get() to unwrap the result from the "FlowQuery envelope".
If no arguments are given, the full context is returned. Otherwise the value contained in the context at the index given as argument is returned. If no such index exists, NULL is returned.
Properties
static protected string | $shortName | {@inheritdoc} | |
static protected int | $priority | The priority of operations. higher numbers override lower ones. |
from AbstractOperation |
static protected bool | $final | {@inheritdoc} |
Methods
This method is called to determine whether the operation can work with the $context objects. It can be implemented to implement runtime conditions.
Details
static int
getPriority()
No description
static bool
isFinal()
No description
static string
getShortName()
No description
bool
canEvaluate($context)
This method is called to determine whether the operation can work with the $context objects. It can be implemented to implement runtime conditions.
mixed|null
evaluate(FlowQuery $flowQuery, array $arguments)
Evaluate the operation on the objects inside $flowQuery->getContext(), taking the $arguments into account.
The resulting operation results should be stored using $flowQuery->setContext().
If the operation is final, evaluate should directly return the operation result.