public function ContainerBuilder::getAlias in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::getAlias()
Gets an alias.
@api
Parameters
string $id The service identifier:
Return value
Throws
InvalidArgumentException if the alias does not exist
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ContainerBuilder.php, line 745
Class
- ContainerBuilder
- ContainerBuilder is a DI container that provides an API to easily describe services.
Namespace
Symfony\Component\DependencyInjectionCode
public function getAlias($id) {
$id = strtolower($id);
if (!isset($this->aliasDefinitions[$id])) {
throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id));
}
return $this->aliasDefinitions[$id];
}