private function PhpDumper::addMethodMap

Adds the methodMap property definition

Return value

string

2 calls to PhpDumper::addMethodMap()
PhpDumper::addConstructor in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Adds the constructor.
PhpDumper::addFrozenConstructor in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Adds the constructor for a frozen container.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php, line 829

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function addMethodMap() {
  if (!($definitions = $this->container
    ->getDefinitions())) {
    return '';
  }
  $code = "        \$this->methodMap = array(\n";
  ksort($definitions);
  foreach ($definitions as $id => $definition) {
    $code .= '            ' . var_export($id, true) . ' => ' . var_export('get' . Container::camelize($id) . 'Service', true) . ",\n";
  }
  return $code . "        );\n";
}