1 | <?php |
||
10 | class Definition |
||
11 | { |
||
12 | /** |
||
13 | * @var array The set of annotations |
||
14 | */ |
||
15 | private $annotations; |
||
16 | |||
17 | /** |
||
18 | * @var CodeBlock Example code |
||
19 | */ |
||
20 | private $code; |
||
21 | |||
22 | public function __construct(array $annotations, CodeBlock $code) |
||
27 | |||
28 | public function getCodeBlock(): CodeBlock |
||
32 | |||
33 | public function getAnnotations(): array |
||
37 | |||
38 | /** |
||
39 | * Check if annotation $needle exists |
||
40 | */ |
||
41 | public function isAnnotatedWith(string $needle): bool |
||
51 | |||
52 | /** |
||
53 | * Read the first argument from annotation $needle |
||
54 | */ |
||
55 | public function readAnnotation(string $needle): string |
||
65 | } |
||
66 |