You are here

private function ClosureExpressionVisitor::orExpressions in Plug 7

Parameters

array $expressions:

Return value

callable

1 call to ClosureExpressionVisitor::orExpressions()
ClosureExpressionVisitor::walkCompositeExpression in lib/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php
Converts a composite expression into the target query language output.

File

lib/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php, line 216

Class

ClosureExpressionVisitor
Walks an expression graph and turns it into a PHP closure.

Namespace

Doctrine\Common\Collections\Expr

Code

private function orExpressions($expressions) {
  return function ($object) use ($expressions) {
    foreach ($expressions as $expression) {
      if ($expression($object)) {
        return true;
      }
    }
    return false;
  };
}