Symfony\Component\DependencyInjection\ContainerBuilder::setAlias
Sets an alias for an existing service.
Signature
public function setAlias(string
$alias,
string|Alias
$id )
Parameters
$alias
— string- The alias to create
$id
— object- The service to alias
Errors/Exceptions
-
InvalidArgumentException
- if the id is not a string or an Alias
-
InvalidArgumentException
- if the alias is for itself