1: <?php
2: namespace Pharborist\ControlStructures;
3:
4: use Pharborist\Node;
5: use Pharborist\ParenTrait;
6: use Pharborist\StatementNode;
7: use Pharborist\ExpressionNode;
8:
9: /**
10: * while control structure.
11: */
12: class WhileNode extends StatementNode {
13: use ParenTrait;
14: use AltSyntaxTrait;
15:
16: /**
17: * @var ExpressionNode
18: */
19: protected $condition;
20:
21: /**
22: * @var Node
23: */
24: protected $body;
25:
26: /**
27: * @return ExpressionNode
28: */
29: public function getCondition() {
30: return $this->condition;
31: }
32:
33: /**
34: * @return Node
35: */
36: public function getBody() {
37: return $this->body;
38: }
39: }
40: