| 1 | <?php |
||
| 10 | class Definition |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var Annotation[] The set of annotations |
||
| 14 | */ |
||
| 15 | private $annotations; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var CodeBlock Example code |
||
| 19 | */ |
||
| 20 | private $code; |
||
| 21 | |||
| 22 | public function __construct(CodeBlock $code, Annotation ...$annotations) |
||
| 27 | |||
| 28 | public function getCodeBlock(): CodeBlock |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return Annotation[] |
||
| 35 | */ |
||
| 36 | public function getAnnotations(): array |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get annotation matching $name |
||
| 43 | */ |
||
| 44 | public function getAnnotation(string $name): Annotation |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Check if annotation $name exists |
||
| 57 | */ |
||
| 58 | public function isAnnotatedWith(string $name): bool |
||
| 68 | } |
||
| 69 |