Fixed Plugin construct (options arg)
This commit is contained in:
parent
f7279b2505
commit
2548cc2b30
|
@ -99,7 +99,11 @@ class Factory
|
|||
if ($constructor) {
|
||||
$argsToUse = [];
|
||||
foreach ($constructor->getParameters() as $param) {
|
||||
$argsToUse = $this->addArgFromParam($argsToUse, $param);
|
||||
if ('options' === $param->getName()) {
|
||||
$argsToUse[] = $options;
|
||||
} else {
|
||||
$argsToUse = $this->addArgFromParam($argsToUse, $param);
|
||||
}
|
||||
}
|
||||
$plugin = $reflectedPlugin->newInstanceArgs($argsToUse);
|
||||
} else {
|
||||
|
@ -204,7 +208,7 @@ class Factory
|
|||
{
|
||||
$name = $param->getName();
|
||||
$type = $this->getParamType($param);
|
||||
$arg = $this->getResourceFor($type, $name);
|
||||
$arg = $this->getResourceFor($type, $name);
|
||||
|
||||
if ($arg !== null) {
|
||||
$existingArgs[] = $arg;
|
||||
|
|
Loading…
Reference in a new issue