function OptimizedPhpArrayDumper::getServiceCall
Same name in other branches
- 9 core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getServiceCall()
- 8.9.x core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getServiceCall()
- 11.x core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getServiceCall()
Gets a service reference for an ID in a suitable PHP array format.
Parameters
string $id: The ID of the service to get a reference for.
int $invalid_behavior: (optional) The invalid behavior of the service.
Return value
string|object A suitable representation of the service reference.
1 call to OptimizedPhpArrayDumper::getServiceCall()
- OptimizedPhpArrayDumper::getReferenceCall in core/
lib/ Drupal/ Component/ DependencyInjection/ Dumper/ OptimizedPhpArrayDumper.php - Gets a service reference for a reference in a suitable PHP array format.
1 method overrides OptimizedPhpArrayDumper::getServiceCall()
- PhpArrayDumper::getServiceCall in core/
lib/ Drupal/ Component/ DependencyInjection/ Dumper/ PhpArrayDumper.php
File
-
core/
lib/ Drupal/ Component/ DependencyInjection/ Dumper/ OptimizedPhpArrayDumper.php, line 505
Class
- OptimizedPhpArrayDumper
- OptimizedPhpArrayDumper dumps a service container as a serialized PHP array.
Namespace
Drupal\Component\DependencyInjection\DumperCode
protected function getServiceCall($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
return (object) [
'type' => 'service',
'id' => $id,
'invalidBehavior' => $invalid_behavior,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.