Browse Source

When we can not create the class, try if the variable is a registered service

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v11.0RC2
Joas Schilling 7 years ago
parent
commit
8b3deb00b3
No account linked to committer's email address
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      lib/private/AppFramework/Utility/SimpleContainer.php

+ 3
- 0
lib/private/AppFramework/Utility/SimpleContainer.php View File

@@ -68,6 +68,9 @@ class SimpleContainer extends Container implements IContainer {
// Service not found, use the default value when available
if ($parameter->isDefaultValueAvailable()) {
$parameters[] = $parameter->getDefaultValue();
} else if ($parameterClass !== null) {
$resolveName = $parameter->getName();
$parameters[] = $this->query($resolveName);
} else {
throw $e;
}

Loading…
Cancel
Save