[DependencyInjection] added methods to remove an alias and a definition from a ContainerBuilder instance
This commit is contained in:
parent
7c1b42e81b
commit
af96c87104
@ -139,6 +139,16 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
parent::set($id, $service);
|
parent::set($id, $service);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a service.
|
||||||
|
*
|
||||||
|
* @param string $id The service identifier
|
||||||
|
*/
|
||||||
|
public function remove($id)
|
||||||
|
{
|
||||||
|
unset($this->definitions[$id]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the given service is defined.
|
* Returns true if the given service is defined.
|
||||||
*
|
*
|
||||||
@ -332,6 +342,16 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
$this->aliases[$alias] = $id;
|
$this->aliases[$alias] = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes an alias.
|
||||||
|
*
|
||||||
|
* @param string $alias The alias to remove
|
||||||
|
*/
|
||||||
|
public function removeAlias($alias)
|
||||||
|
{
|
||||||
|
unset($this->aliases[$alias]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if an alias exists under the given identifier.
|
* Returns true if an alias exists under the given identifier.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user