1 | <?php |
||
18 | final class ClassMetadata |
||
19 | { |
||
20 | /** |
||
21 | * The class name |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | private $name; |
||
26 | |||
27 | /** |
||
28 | * The class annotations |
||
29 | * |
||
30 | * @var AnnotationSet |
||
31 | */ |
||
32 | private $annotations; |
||
33 | |||
34 | /** |
||
35 | * Constructor |
||
36 | * |
||
37 | * @param string $name |
||
38 | * @param AnnotationSet $annotations |
||
39 | */ |
||
40 | 8 | public function __construct(string $name, AnnotationSet $annotations) |
|
45 | |||
46 | /** |
||
47 | * Get the class name as a string |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | 2 | public function getName(): string |
|
55 | |||
56 | /** |
||
57 | * Get all class annotations |
||
58 | * |
||
59 | * @return AnnotationSet |
||
60 | */ |
||
61 | 1 | public function getAnnotations(): AnnotationSet |
|
65 | |||
66 | /** |
||
67 | * Get a specific annotation by class name, returns null if the annotation |
||
68 | * doesn't exist. |
||
69 | * |
||
70 | * @param string $annotationClass |
||
71 | * @return null|object |
||
72 | */ |
||
73 | 2 | public function getAnnotation(string $annotationClass) |
|
77 | } |
||
78 |