You are here

protected function PhpArrayDumper::getServiceCall in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper::getServiceCall()
  2. 9 core/lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper::getServiceCall()

File

core/lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php, line 50

Class

PhpArrayDumper
PhpArrayDumper dumps a service container as a PHP array.

Namespace

Drupal\Component\DependencyInjection\Dumper

Code

protected function getServiceCall($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
  if ($invalid_behavior !== ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
    return '@?' . $id;
  }
  return '@' . $id;
}