1 | <?php |
||
19 | trait HasDirectives |
||
20 | { |
||
21 | /** |
||
22 | * @var array|DirectiveInvocation[] |
||
23 | */ |
||
24 | protected $directives = []; |
||
25 | |||
26 | /** |
||
27 | * @param string $name |
||
28 | * @return bool |
||
29 | */ |
||
30 | public function hasDirective(string $name): bool |
||
34 | |||
35 | /** |
||
36 | * @param string|null $name |
||
37 | * @return iterable|DirectiveInvocation[]|\Generator |
||
38 | */ |
||
39 | public function getDirectives(string $name = null): iterable |
||
47 | |||
48 | /** |
||
49 | * @return int |
||
50 | */ |
||
51 | public function getNumberOfDirectives(): int |
||
55 | |||
56 | /** |
||
57 | * @param DirectiveInvocation $invocation |
||
58 | */ |
||
59 | protected function addDirective(DirectiveInvocation $invocation): void |
||
63 | } |
||
64 |