You are here

private function ClosureExpressionVisitor::orExpressions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ClosureExpressionVisitor.php \Doctrine\Common\Collections\Expr\ClosureExpressionVisitor::orExpressions()

Parameters

array $expressions:

Return value

callable

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

File

vendor/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;
  };
}