1 | <?php |
||
11 | final class Annotation |
||
12 | { |
||
13 | /** |
||
14 | * @var VariableAnnotation[] |
||
15 | */ |
||
16 | private $properties = []; |
||
17 | /** |
||
18 | * @var VariableAnnotation[][] |
||
19 | */ |
||
20 | private $parameters = []; |
||
21 | |||
22 | /** |
||
23 | * Annotation constructor. |
||
24 | * |
||
25 | * @param ReflectionClass $class |
||
26 | */ |
||
27 | public function __construct(ReflectionClass $class) |
||
34 | |||
35 | /** |
||
36 | * @param AnnotationParser $parser |
||
37 | * @param ReflectionClass $class |
||
38 | */ |
||
39 | private function collectPropertyAnnotations(AnnotationParser $parser, ReflectionClass $class): void |
||
50 | |||
51 | /** |
||
52 | * @param AnnotationParser $parser |
||
53 | * @param ReflectionClass $class |
||
54 | */ |
||
55 | private function collectMethodParameterAnnotations(AnnotationParser $parser, ReflectionClass $class): void |
||
66 | |||
67 | /** |
||
68 | * @return VariableAnnotation[] |
||
69 | */ |
||
70 | public function getAllProperties(): array |
||
74 | |||
75 | /** |
||
76 | * @param string $property |
||
77 | * |
||
78 | * @return VariableAnnotation |
||
79 | */ |
||
80 | public function getProperty(string $property): VariableAnnotation |
||
84 | |||
85 | /** |
||
86 | * @param string $property |
||
87 | * |
||
88 | * @return bool |
||
89 | */ |
||
90 | public function hasProperty(string $property): bool |
||
94 | |||
95 | /** |
||
96 | * @return VariableAnnotation[] |
||
97 | */ |
||
98 | public function getAllMethodsParameters(): array |
||
102 | |||
103 | /** |
||
104 | * @param string $method |
||
105 | * |
||
106 | * @return VariableAnnotation[] |
||
107 | */ |
||
108 | public function getMethodParameters(string $method): array |
||
112 | |||
113 | /** |
||
114 | * @param string $method |
||
115 | * @param string $param |
||
116 | * |
||
117 | * @return VariableAnnotation |
||
118 | */ |
||
119 | public function getMethodParameter(string $method, string $param): VariableAnnotation |
||
123 | |||
124 | /** |
||
125 | * @param string $method |
||
126 | * @param string|null $param |
||
127 | * |
||
128 | * @return bool |
||
129 | */ |
||
130 | public function hasMethodParameter(string $method, string $param = null): bool |
||
134 | } |