1 | <?php |
||
37 | class AnnotationReflectionClassReader { |
||
38 | |||
39 | /** @var \Brickoo\Component\Annotation\AnnotationParser */ |
||
40 | private $annotationParser; |
||
41 | |||
42 | /** @var \Brickoo\Component\Annotation\Definition\AnnotationDefinitionTargetFilter */ |
||
43 | private $annotationTargetFilter; |
||
44 | |||
45 | /** |
||
46 | * Class constructor. |
||
47 | * @param \Brickoo\Component\Annotation\AnnotationParser $annotationParser |
||
48 | */ |
||
49 | 1 | public function __construct(AnnotationParser $annotationParser) { |
|
52 | |||
53 | /** |
||
54 | * Returns the read annotations. |
||
55 | * @param \Brickoo\Component\Common\Collection $collection |
||
56 | * @param \ReflectionClass $reflectionClass |
||
57 | * @return \Brickoo\Component\Annotation\AnnotationReaderResult |
||
58 | */ |
||
59 | 1 | public function getAnnotations(Collection $collection, ReflectionClass $reflectionClass) { |
|
67 | |||
68 | /** |
||
69 | * Adds class annotations to the reader result. |
||
70 | * @param \Brickoo\Component\Annotation\AnnotationReaderResult $result |
||
71 | * @param \ReflectionClass $class |
||
72 | * @return \Brickoo\Component\Annotation\AnnotationReflectionClassReader |
||
73 | */ |
||
74 | 1 | private function addClassAnnotations(AnnotationReaderResult $result, ReflectionClass $class) { |
|
79 | |||
80 | /** |
||
81 | * Adds methods annotations to the reader result. |
||
82 | * @param \Brickoo\Component\Annotation\AnnotationReaderResult $result |
||
83 | * @param \ReflectionClass $class |
||
84 | * @return \Brickoo\Component\Annotation\AnnotationReflectionClassReader |
||
85 | */ |
||
86 | 1 | private function addMethodsAnnotations(AnnotationReaderResult $result, ReflectionClass $class) { |
|
91 | |||
92 | /** |
||
93 | * Adds properties annotations to the reader result. |
||
94 | * @param \Brickoo\Component\Annotation\AnnotationReaderResult $result |
||
95 | * @param \ReflectionClass $class |
||
96 | * @return \Brickoo\Component\Annotation\AnnotationReflectionClassReader |
||
97 | */ |
||
98 | 1 | private function addPropertiesAnnotations(AnnotationReaderResult $result, ReflectionClass $class) { |
|
103 | |||
104 | /** |
||
105 | * Set the annotation white list for an annotation type. |
||
106 | * @param integer $targetType |
||
107 | * @return \Brickoo\Component\Annotation\AnnotationReflectionClassReader |
||
108 | */ |
||
109 | 1 | private function setAnnotationWhiteList($targetType) { |
|
117 | |||
118 | /** |
||
119 | * Parse the annotation list from class member of a type. |
||
120 | * @param \Brickoo\Component\Annotation\AnnotationReaderResult $result |
||
121 | * @param \ReflectionClass $reflectionClass |
||
122 | * @param integer $targetType |
||
123 | * @return \Brickoo\Component\Annotation\AnnotationReflectionClassReader |
||
124 | */ |
||
125 | 1 | private function parseAnnotationList(AnnotationReaderResult $result, ReflectionClass $reflectionClass, $targetType) { |
|
137 | |||
138 | /** |
||
139 | * Get the reflection member list. |
||
140 | * @param ReflectionClass $reflectionClass |
||
141 | * @param integer $targetType |
||
142 | * @return array the reflection member list |
||
143 | */ |
||
144 | 1 | private function getReflectionMemberList(ReflectionClass $reflectionClass, $targetType) { |
|
158 | |||
159 | /** |
||
160 | * Returns the annotations names. |
||
161 | * @param \ArrayIterator $annotationsDefinitionsIterator |
||
162 | * @return array the annotations names |
||
163 | */ |
||
164 | 1 | private function getAnnotationsNames(\ArrayIterator $annotationsDefinitionsIterator) { |
|
171 | |||
172 | /** |
||
173 | * Parse the doc comments annotations. |
||
174 | * @param AnnotationReaderResult $result |
||
175 | * @param integer $target |
||
176 | * @param string $targetLocation |
||
177 | * @param string $docComment |
||
178 | * @return \Brickoo\Component\Annotation\AnnotationReflectionClassReader |
||
179 | */ |
||
180 | 1 | private function parseAnnotations(AnnotationReaderResult $result, $target, $targetLocation, $docComment) { |
|
186 | |||
187 | /** |
||
188 | * Adds the annotations to the result collection. |
||
189 | * @param \Brickoo\Component\Annotation\AnnotationReaderResult $result |
||
190 | * @param Annotation[] $annotations |
||
191 | * @return \Brickoo\Component\Annotation\AnnotationReflectionClassReader |
||
192 | */ |
||
193 | 1 | private function addResultAnnotations(AnnotationReaderResult $result, array $annotations) { |
|
199 | |||
200 | } |
||
201 |