1: <?php
2: namespace Pharborist\ControlStructures;
3:
4: use Pharborist\NodeCollection;
5: use Pharborist\ParenTrait;
6: use Pharborist\StatementNode;
7: use Pharborist\ExpressionNode;
8:
9: 10: 11:
12: class SwitchNode extends StatementNode {
13: use ParenTrait;
14: use AltSyntaxTrait;
15:
16: 17: 18:
19: protected $switchOn;
20:
21: 22: 23:
24: public function getSwitchOn() {
25: return $this->switchOn;
26: }
27:
28: 29: 30:
31: public function getCases() {
32: return new NodeCollection($this->childrenByInstance('\Pharborist\StatementNode'), FALSE);
33: }
34: }
35: