1: <?php
2: namespace Pharborist\ControlStructures;
3:
4: use Pharborist\Node;
5: use Pharborist\ParenTrait;
6: use Pharborist\StatementNode;
7:
8: /**
9: * foreach control structure.
10: */
11: class ForeachNode extends StatementNode {
12: use ParenTrait;
13: use AltSyntaxTrait;
14:
15: /**
16: * @var Node
17: */
18: protected $onEach;
19:
20: /**
21: * @var Node
22: */
23: protected $key;
24:
25: /**
26: * @var Node
27: */
28: protected $value;
29:
30: /**
31: * @var Node
32: */
33: protected $body;
34:
35: /**
36: * @return Node
37: */
38: public function getOnEach() {
39: return $this->onEach;
40: }
41:
42: /**
43: * @return Node
44: */
45: public function getKey() {
46: return $this->key;
47: }
48:
49: /**
50: * @return Node
51: */
52: public function getValue() {
53: return $this->value;
54: }
55:
56: /**
57: * @return Node
58: */
59: public function getBody() {
60: return $this->body;
61: }
62: }
63: