You are here

private function YamlDumper::getServiceCall in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php \Symfony\Component\DependencyInjection\Dumper\YamlDumper::getServiceCall()

Gets the service call.

Parameters

string $id:

Reference $reference:

Return value

string

2 calls to YamlDumper::getServiceCall()
YamlDumper::dumpCallable in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
Dumps callable to YAML format
YamlDumper::dumpValue in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
Dumps the value to YAML format.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php, line 273

Class

YamlDumper
YamlDumper dumps a service container as a YAML string.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

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