@@ 151-159 (lines=9) @@ | ||
148 | if (false !== $selfReflector->getParentClass()) { |
|
149 | $properties = $this->getClassProperties($selfReflector->getParentClass()->getName()); |
|
150 | } |
|
151 | foreach ($selfReflector->getProperties(\ReflectionProperty::IS_PROTECTED) as $property) { |
|
152 | $doc = $property->getDocComment(); |
|
153 | if (preg_match('/@Inyectable/im', $doc)) { |
|
154 | $instanceType = $this->extractVarType($property->getDocComment()); |
|
155 | if (null !== $instanceType) { |
|
156 | $properties[$property->getName()] = $instanceType; |
|
157 | } |
|
158 | } |
|
159 | } |
|
160 | return $properties; |
|
161 | } |
|
162 |
@@ 222-229 (lines=8) @@ | ||
219 | $properties = []; |
|
220 | $reflector = new \ReflectionClass($class); |
|
221 | if ($reflector->isSubclassOf(self::DTO_INTERFACE)) { |
|
222 | foreach ($reflector->getProperties(\ReflectionMethod::IS_PUBLIC) as $property) { |
|
223 | $type = $this->extractVarType($property->getDocComment()); |
|
224 | if(class_exists($type)) { |
|
225 | $properties[$property->getName()] = $this->extractModelFields($type); |
|
226 | } else { |
|
227 | $properties[$property->getName()] = $type; |
|
228 | } |
|
229 | } |
|
230 | } |
|
231 | ||
232 | return $properties; |