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