public function ExpressionVisitor::dispatch in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Expr/ExpressionVisitor.php \Doctrine\Common\Collections\Expr\ExpressionVisitor::dispatch()
Dispatches walking an expression to the appropriate handler.
Parameters
Expression $expr:
Return value
mixed
Throws
\RuntimeException
1 call to ExpressionVisitor::dispatch()
- 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/ ExpressionVisitor.php, line 66
Class
- ExpressionVisitor
- An Expression visitor walks a graph of expressions and turns them into a query for the underlying implementation.
Namespace
Doctrine\Common\Collections\ExprCode
public function dispatch(Expression $expr) {
switch (true) {
case $expr instanceof Comparison:
return $this
->walkComparison($expr);
case $expr instanceof Value:
return $this
->walkValue($expr);
case $expr instanceof CompositeExpression:
return $this
->walkCompositeExpression($expr);
default:
throw new \RuntimeException("Unknown Expression " . get_class($expr));
}
}