You are here

private function YamlDumper::dumpCallable 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::dumpCallable()

Dumps callable to YAML format

Parameters

callable $callable:

Return value

callable

1 call to YamlDumper::dumpCallable()
YamlDumper::addService in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
Adds a service.

File

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

Class

YamlDumper
YamlDumper dumps a service container as a YAML string.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function dumpCallable($callable) {
  if (is_array($callable)) {
    if ($callable[0] instanceof Reference) {
      $callable = array(
        $this
          ->getServiceCall((string) $callable[0], $callable[0]),
        $callable[1],
      );
    }
    else {
      $callable = array(
        $callable[0],
        $callable[1],
      );
    }
  }
  return $callable;
}