src/ServiceContainer.php
public function setAlias($alias, $service)
    {
        if ($alias == $service) {
            throw new ContainerException('Alias and service names can not be equals');
        }

        $this->aliases[$alias] = $service;
    }
public function setAlias($alias, $service)
    {
        if ($alias == $service) {
            throw new ContainerException('Alias and service names can not be equals');
        }

        $this->aliases[$alias] = $service;
    }
public function setAlias ( $ alias , $ service ) { if ( $ alias == $ service ) { throw new ContainerException ( 'Alias and service names can not be equals' ) ; } $ this -> aliases [ $ alias ] = $ service ; }
Set entry alias in the container

@param string $alias Identifier for entry alias.
@param string $service Identifier of the service for which the alias is define.
@throws ContainerException Error while service name and aliad are equals.
Set entry alias in the container