setOperationResolver() public method

Setter for setting the operation resolver from the outside, only needed to successfully run unit tests (hacky!)
public setOperationResolver ( Neos\Eel\FlowQuery\OperationResolverInterface $operationResolver )
$operationResolver Neos\Eel\FlowQuery\OperationResolverInterface
Ejemplo n.º 1
0
 /**
  * Add a new operation to the operation list and return the new FlowQuery
  * object. If the operation is final, we directly compute the result and
  * return the value.
  *
  * @param string $operationName
  * @param array $arguments
  * @return FlowQuery
  */
 public function __call($operationName, array $arguments)
 {
     $updatedOperations = $this->operations;
     $updatedOperations[] = ['name' => $operationName, 'arguments' => $arguments];
     if ($this->operationResolver->isFinalOperation($operationName)) {
         $operationsBackup = $this->operations;
         $contextBackup = $this->context;
         $this->operations = $updatedOperations;
         $operationResult = $this->evaluateOperations();
         $this->operations = $operationsBackup;
         $this->context = $contextBackup;
         return $operationResult;
     } else {
         // non-final operation
         $flowQuery = new FlowQuery($this->context, $updatedOperations);
         $flowQuery->setOperationResolver($this->operationResolver);
         // Only needed for unit tests; hacky!
         return $flowQuery;
     }
 }