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) |
||
49 | |||
50 | /** |
||
51 | * @return VariableAnnotation[] |
||
52 | */ |
||
53 | public function getAllProperties(): array |
||
57 | |||
58 | /** |
||
59 | * @param string $property |
||
60 | * |
||
61 | * @return VariableAnnotation |
||
62 | */ |
||
63 | public function getProperty(string $property): VariableAnnotation |
||
67 | |||
68 | /** |
||
69 | * @param string $property |
||
70 | * |
||
71 | * @return bool |
||
72 | */ |
||
73 | public function hasProperty(string $property): bool |
||
77 | |||
78 | /** |
||
79 | * @return VariableAnnotation[] |
||
80 | */ |
||
81 | public function getAllMethodsParameters(): array |
||
85 | |||
86 | /** |
||
87 | * @param string $method |
||
88 | * |
||
89 | * @return VariableAnnotation[] |
||
90 | */ |
||
91 | public function getMethodParameters(string $method): array |
||
95 | |||
96 | /** |
||
97 | * @param string $method |
||
98 | * @param string $param |
||
99 | * |
||
100 | * @return VariableAnnotation |
||
101 | */ |
||
102 | public function getMethodParameter(string $method, string $param): VariableAnnotation |
||
106 | |||
107 | /** |
||
108 | * @param string $method |
||
109 | * @param string|null $param |
||
110 | * |
||
111 | * @return bool |
||
112 | */ |
||
113 | public function hasMethodParameter(string $method, string $param = null): bool |
||
117 | } |