1: | <?php declare(strict_types=1); |
2: | |
3: | namespace PhpParser\Node\Stmt; |
4: | |
5: | use PhpParser\Node\Stmt; |
6: | use PhpParser\Node\UseItem; |
7: | |
8: | class Use_ extends Stmt { |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | public const TYPE_UNKNOWN = 0; |
15: | |
16: | public const TYPE_NORMAL = 1; |
17: | |
18: | public const TYPE_FUNCTION = 2; |
19: | |
20: | public const TYPE_CONSTANT = 3; |
21: | |
22: | |
23: | public int $type; |
24: | |
25: | public array $uses; |
26: | |
27: | |
28: | |
29: | |
30: | |
31: | |
32: | |
33: | |
34: | public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { |
35: | $this->attributes = $attributes; |
36: | $this->type = $type; |
37: | $this->uses = $uses; |
38: | } |
39: | |
40: | public function getSubNodeNames(): array { |
41: | return ['type', 'uses']; |
42: | } |
43: | |
44: | public function getType(): string { |
45: | return 'Stmt_Use'; |
46: | } |
47: | } |
48: | |