| @@ 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; |
|
| @@ 150-158 (lines=9) @@ | ||
| 147 | if (false !== $selfReflector->getParentClass()) { |
|
| 148 | $properties = $this->getClassProperties($selfReflector->getParentClass()->getName()); |
|
| 149 | } |
|
| 150 | foreach ($selfReflector->getProperties(\ReflectionProperty::IS_PROTECTED) as $property) { |
|
| 151 | $doc = $property->getDocComment(); |
|
| 152 | if (preg_match('/@Inyectable/im', $doc)) { |
|
| 153 | $instanceType = $this->extractVarType($property->getDocComment()); |
|
| 154 | if (null !== $instanceType) { |
|
| 155 | $properties[$property->getName()] = $instanceType; |
|
| 156 | } |
|
| 157 | } |
|
| 158 | } |
|
| 159 | return $properties; |
|
| 160 | } |
|
| 161 | ||