private function YamlDumper::addServiceAlias in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php \Symfony\Component\DependencyInjection\Dumper\YamlDumper::addServiceAlias()
Adds a service alias.
Parameters
string $alias:
Alias $id:
Return value
string
1 call to YamlDumper::addServiceAlias()
- YamlDumper::addServices in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ YamlDumper.php - Adds services.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ YamlDumper.php, line 162
Class
- YamlDumper
- YamlDumper dumps a service container as a YAML string.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function addServiceAlias($alias, $id) {
if ($id
->isPublic()) {
return sprintf(" %s: @%s\n", $alias, $id);
}
else {
return sprintf(" %s:\n alias: %s\n public: false", $alias, $id);
}
}