@@ 179-192 (lines=14) @@ | ||
176 | $properties = array_merge($properties, $translationProperties); |
|
177 | } |
|
178 | ||
179 | foreach ($properties as $property) { |
|
180 | $annotations = $this->reader->getPropertyAnnotations($property); |
|
181 | foreach ($annotations as $key => $annotationObj) { |
|
182 | if ($annotationObj instanceof BusinessProperty && !in_array($class, $businessProperties)) { |
|
183 | if (!$annotations[$key]->getTypes()) { |
|
184 | $message = $class->name.':$'.$property->name.'" field'; |
|
185 | throw AnnotationException::requiredError('type', 'BusinessProperty annotation', $message, 'array or string'); |
|
186 | } |
|
187 | foreach ($annotations[$key]->getTypes() as $type) { |
|
188 | $businessProperties[$type][] = $property->name; |
|
189 | } |
|
190 | } |
|
191 | } |
|
192 | } |
|
193 | // we load business properties of parents recursively |
|
194 | // because they are defined by an annotation not by the property type(private, protected, public) |
|
195 | $parentClass = $class->getParentClass(); |
|
@@ 231-243 (lines=13) @@ | ||
228 | //Store receiver properties |
|
229 | foreach ($properties as $property) { |
|
230 | $annotations = $this->reader->getPropertyAnnotations($property); |
|
231 | foreach ($annotations as $key => $annotationObj) { |
|
232 | if ($annotationObj instanceof ReceiverPropertyAnnotation && !in_array($class, $receiverPropertiesTypes)) { |
|
233 | if (!$annotations[$key]->getTypes()) { |
|
234 | $message = $class->name.':$'.$property->name.'" field'; |
|
235 | throw AnnotationException::requiredError('type', 'ReceiverProperty annotation', $message, 'array or string'); |
|
236 | } |
|
237 | foreach ($annotations[$key]->getTypes() as $type) { |
|
238 | $receiverProperty = new ReceiverProperty(); |
|
239 | $receiverProperty->setFieldName($property->name); |
|
240 | $receiverPropertiesTypes[$type][] = $receiverProperty; |
|
241 | } |
|
242 | } |
|
243 | } |
|
244 | } |
|
245 | ||
246 | //Set receiver properties as required if necessary |