lib/Drupal/Component/DependencyInjection/Container.php 1 location
|
@@ 342-353 (lines=12) @@
|
339 |
|
} |
340 |
|
} |
341 |
|
|
342 |
|
if (isset($definition['configurator'])) { |
343 |
|
$callable = $definition['configurator']; |
344 |
|
if (is_array($callable)) { |
345 |
|
$callable = $this->resolveServicesAndParameters($callable); |
346 |
|
} |
347 |
|
|
348 |
|
if (!is_callable($callable)) { |
349 |
|
throw new InvalidArgumentException(sprintf('The configurator for class "%s" is not a callable.', get_class($service))); |
350 |
|
} |
351 |
|
|
352 |
|
call_user_func($callable, $service); |
353 |
|
} |
354 |
|
|
355 |
|
return $service; |
356 |
|
} |
lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php 1 location
|
@@ 170-181 (lines=12) @@
|
167 |
|
} |
168 |
|
} |
169 |
|
|
170 |
|
if (isset($definition['configurator'])) { |
171 |
|
$callable = $definition['configurator']; |
172 |
|
if (is_array($callable)) { |
173 |
|
$callable = $this->resolveServicesAndParameters($callable); |
174 |
|
} |
175 |
|
|
176 |
|
if (!is_callable($callable)) { |
177 |
|
throw new InvalidArgumentException(sprintf('The configurator for class "%s" is not a callable.', get_class($service))); |
178 |
|
} |
179 |
|
|
180 |
|
call_user_func($callable, $service); |
181 |
|
} |
182 |
|
|
183 |
|
return $service; |
184 |
|
} |