@@ 43-70 (lines=28) @@ | ||
40 | /** |
|
41 | * {@inheritdoc} |
|
42 | */ |
|
43 | public function visit(VisitorElement $element, &$handle = null, $eldnah = null) |
|
44 | { |
|
45 | if ($element instanceof Model\Rule) { |
|
46 | return $this->visitModel($element, $handle, $eldnah); |
|
47 | } |
|
48 | ||
49 | if ($element instanceof AST\Operator) { |
|
50 | return $this->visitOperator($element, $handle, $eldnah); |
|
51 | } |
|
52 | ||
53 | if ($element instanceof AST\Bag\Scalar) { |
|
54 | return $this->visitScalar($element, $handle, $eldnah); |
|
55 | } |
|
56 | ||
57 | if ($element instanceof AST\Bag\RulerArray) { |
|
58 | return $this->visitArray($element, $handle, $eldnah); |
|
59 | } |
|
60 | ||
61 | if ($element instanceof AST\Bag\Context) { |
|
62 | return $this->visitAccess($element, $handle, $eldnah); |
|
63 | } |
|
64 | ||
65 | if ($element instanceof Model\Parameter) { |
|
66 | return $this->visitParameter($element, $handle, $eldnah); |
|
67 | } |
|
68 | ||
69 | throw new \LogicException(sprintf('Element of type "%s" not handled', get_class($element))); |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * {@inheritdoc} |
@@ 18-45 (lines=28) @@ | ||
15 | /** |
|
16 | * {@inheritdoc} |
|
17 | */ |
|
18 | public function visit(VisitorElement $element, &$handle = null, $eldnah = null) |
|
19 | { |
|
20 | if ($element instanceof Model\Rule) { |
|
21 | return $this->visitModel($element, $handle, $eldnah); |
|
22 | } |
|
23 | ||
24 | if ($element instanceof AST\Operator) { |
|
25 | return $this->visitOperator($element, $handle, $eldnah); |
|
26 | } |
|
27 | ||
28 | if ($element instanceof AST\Bag\Scalar) { |
|
29 | return $this->visitScalar($element, $handle, $eldnah); |
|
30 | } |
|
31 | ||
32 | if ($element instanceof AST\Bag\RulerArray) { |
|
33 | return $this->visitArray($element, $handle, $eldnah); |
|
34 | } |
|
35 | ||
36 | if ($element instanceof AST\Bag\Context) { |
|
37 | return $this->visitAccess($element, $handle, $eldnah); |
|
38 | } |
|
39 | ||
40 | if ($element instanceof Model\Parameter) { |
|
41 | return $this->visitParameter($element, $handle, $eldnah); |
|
42 | } |
|
43 | ||
44 | throw new \LogicException(sprintf('Element of type "%s" not handled', get_class($element))); |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * {@inheritdoc} |