Debian Codegraph @

vendor/doctrine/collections/src/Expr/ExpressionVisitor.php

raw
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Doctrine\Common\Collections\Expr;
6
7 /**
8 * An Expression visitor walks a graph of expressions and turns them into a
9 * query for the underlying implementation.
10 */
11 abstract class ExpressionVisitor
12 {
13 /**
14 * Converts a comparison expression into the target query language output.
15 *
16 * @return mixed
17 */
18 abstract public function walkComparison(Comparison $comparison);
19
20 /**
21 * Converts a value expression into the target query language part.
22 *
23 * @return mixed
24 */
25 abstract public function walkValue(Value $value);
26
27 /**
28 * Converts a composite expression into the target query language output.
29 *
30 * @return mixed
31 */
32 abstract public function walkCompositeExpression(CompositeExpression $expr);
33
34 /**
35 * Dispatches walking an expression to the appropriate handler.
36 *
37 * @return mixed
38 */
39 public function dispatch(Expression $expr)
40 {
41 return $expr->visit($this);
42 }
43 }