|
@@ 232-240 (lines=9) @@
|
| 229 |
|
if ($value instanceof \ReflectionParameter) { |
| 230 |
|
$class = $value->getClass(); |
| 231 |
|
|
| 232 |
|
if ($class instanceof \ReflectionClass) { |
| 233 |
|
if ($class->isInterface()) { |
| 234 |
|
$params[$key] = $this->getConcreteFromInterface($class->getName()); |
| 235 |
|
|
| 236 |
|
$this->markAsResolved($class->getName()); |
| 237 |
|
} else { |
| 238 |
|
$params[$key] = $this->circularDependencyResolver($class->getName()); |
| 239 |
|
} |
| 240 |
|
} |
| 241 |
|
} else { |
| 242 |
|
if (is_string($value) && class_exists($value)) { |
| 243 |
|
$params[$key] = $this->circularDependencyResolver($value); |
|
@@ 280-288 (lines=9) @@
|
| 277 |
|
foreach ($param as $key => $value) { |
| 278 |
|
$class = $value->getClass(); |
| 279 |
|
|
| 280 |
|
if ($class instanceof \ReflectionClass) { |
| 281 |
|
if ($class->isInterface()) { |
| 282 |
|
$param[$key] = $this->getConcreteFromInterface($class->getName()); |
| 283 |
|
|
| 284 |
|
$this->markAsResolved($class->getName()); |
| 285 |
|
} else { |
| 286 |
|
$param[$key] = $this->circularDependencyResolver($class->getName()); |
| 287 |
|
} |
| 288 |
|
} |
| 289 |
|
} |
| 290 |
|
|
| 291 |
|
return $reflector->newInstanceArgs($param); |