private function PhpDumper::addMethodMap in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/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 modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ PhpDumper.php - Adds the constructor.
- PhpDumper::addFrozenConstructor in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ PhpDumper.php - Adds the constructor for a frozen container.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ PhpDumper.php, line 954
Class
- PhpDumper
- PhpDumper dumps a service container as a PHP class.
Namespace
Symfony\Component\DependencyInjection\DumperCode
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";
}