| 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 | 4 | public function hasDirective(string $name): bool |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @param string|null $name |
||
| 37 | * @return iterable|DirectiveInvocation[]|\Generator |
||
| 38 | */ |
||
| 39 | 4 | public function getDirectives(string $name = null): iterable |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @param DirectiveInvocation $invocation |
||
| 50 | * @return ProvidesDirectives |
||
| 51 | */ |
||
| 52 | 1 | public function withDirective(DirectiveInvocation $invocation): ProvidesDirectives |
|
| 58 | } |
||
| 59 |