You are here

public function ContainerBuilder::addAliases in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::addAliases()

Adds the service aliases.

@api

Parameters

array $aliases An array of aliases:

2 calls to ContainerBuilder::addAliases()
ContainerBuilder::merge in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php
Merges a ContainerBuilder with the current ContainerBuilder configuration.
ContainerBuilder::setAliases in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php
Sets the service aliases.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php, line 646

Class

ContainerBuilder
ContainerBuilder is a DI container that provides an API to easily describe services.

Namespace

Symfony\Component\DependencyInjection

Code

public function addAliases(array $aliases) {
  foreach ($aliases as $alias => $id) {
    $this
      ->setAlias($alias, $id);
  }
}