You are here

protected function PhpArrayDumper::getServiceCall in Service Container 7

Same name in this branch
  1. 7 lib/Drupal/Core/DependencyInjection/Dumper/PhpArrayDumper.php \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper::getServiceCall()
  2. 7 lib/Drupal/Component/DependencyInjection/Dumper/PhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\PhpArrayDumper::getServiceCall()
Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/DependencyInjection/Dumper/PhpArrayDumper.php \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper::getServiceCall()

Gets the service call.

Parameters

string $id:

Reference $reference:

Return value

string

2 calls to PhpArrayDumper::getServiceCall()
PhpArrayDumper::dumpCallable in lib/Drupal/Core/DependencyInjection/Dumper/PhpArrayDumper.php
Dumps callable to YAML format
PhpArrayDumper::dumpValue in lib/Drupal/Core/DependencyInjection/Dumper/PhpArrayDumper.php
Dumps the value to YAML format.

File

lib/Drupal/Core/DependencyInjection/Dumper/PhpArrayDumper.php, line 327
Contains \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper

Class

PhpArrayDumper
PhpArrayDumper dumps a service container as a serialized PHP array.

Namespace

Drupal\Core\DependencyInjection\Dumper

Code

protected function getServiceCall($id, Reference $reference = null) {
  if (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference
    ->getInvalidBehavior()) {
    return sprintf('@?%s', $id);
  }
  return sprintf('@%s', $id);
}