interface OperationInterface (View source)

Contract for a FlowQuery operation which is applied onto a set of objects.

Methods

static string
getShortName()

No description

static int
getPriority()

No description

static bool
isFinal()

No description

bool
canEvaluate(array $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
evaluate(FlowQuery $flowQuery, array $arguments)

Evaluate the operation on the objects inside $flowQuery->getContext(), taking the $arguments into account.

Details

static string getShortName()

No description

Return Value

string

the short name of the operation

static int getPriority()

No description

Return Value

int

the priority of the operation

static bool isFinal()

No description

Return Value

bool

true if the operation is final, false otherwise

bool canEvaluate(array $context)

This method is called to determine whether the operation can work with the $context objects. It can be implemented to implement runtime conditions.

Parameters

array $context

(or array-like object) $context onto which this operation should be applied

Return Value

bool

true if the operation can be applied onto the $context, false otherwise

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

Parameters

FlowQuery $flowQuery

the FlowQuery object

array $arguments

the arguments for this operation

Return Value

mixed

if the operation is final, the return value