1: | <?php declare(strict_types=1); |
2: | |
3: | namespace PhpParser\Node\Stmt; |
4: | |
5: | use PhpParser\Node; |
6: | |
7: | class For_ extends Node\Stmt |
8: | { |
9: | |
10: | public $init; |
11: | |
12: | public $cond; |
13: | |
14: | public $loop; |
15: | |
16: | public $stmts; |
17: | |
18: | |
19: | |
20: | |
21: | |
22: | |
23: | |
24: | |
25: | |
26: | |
27: | |
28: | public function __construct(array $subNodes = [], array $attributes = []) { |
29: | $this->attributes = $attributes; |
30: | $this->init = $subNodes['init'] ?? []; |
31: | $this->cond = $subNodes['cond'] ?? []; |
32: | $this->loop = $subNodes['loop'] ?? []; |
33: | $this->stmts = $subNodes['stmts'] ?? []; |
34: | } |
35: | |
36: | public function getSubNodeNames() : array { |
37: | return ['init', 'cond', 'loop', 'stmts']; |
38: | } |
39: | |
40: | public function getType() : string { |
41: | return 'Stmt_For'; |
42: | } |
43: | } |
44: | |