public function ContainerBuilder::resolveServices in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::resolveServices()
Replaces service references by the real service instance and evaluates expressions.
Parameters
mixed $value A value:
Return value
mixed The same value with all service references replaced by the real service instances and all expressions evaluated
3 calls to ContainerBuilder::resolveServices()
- ContainerBuilder::callMethod in lib/
Drupal/ Core/ DependencyInjection/ ContainerBuilder.php - A 1to1 copy of parent::callMethod.
- ContainerBuilder::callMethod in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ContainerBuilder.php - ContainerBuilder::createService in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ContainerBuilder.php - Creates a service for a service definition.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ContainerBuilder.php, line 1006
Class
- ContainerBuilder
- ContainerBuilder is a DI container that provides an API to easily describe services.
Namespace
Symfony\Component\DependencyInjectionCode
public function resolveServices($value) {
if (is_array($value)) {
$value = array_map(array(
$this,
'resolveServices',
), $value);
}
elseif ($value instanceof Reference) {
$value = $this
->get((string) $value, $value
->getInvalidBehavior());
}
elseif ($value instanceof Definition) {
$value = $this
->createService($value, null);
}
elseif ($value instanceof Expression) {
$value = $this
->getExpressionLanguage()
->evaluate($value, array(
'container' => $this,
));
}
return $value;
}