You are here

private function PhpDumper::addMethodMap in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::addMethodMap()

Adds the methodMap property definition.

Return value

string

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

File

vendor/symfony/dependency-injection/Dumper/PhpDumper.php, line 954

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' . $this
      ->camelize($id) . 'Service', true) . ",\n";
  }
  return $code . "        );\n";
}