ManaPHP\Di::remove PHP Метод

remove() публичный Метод

Removes a service in the services container
public remove ( string $name ) : static
$name string
Результат static
    public function remove($name)
    {
        if (in_array($name, $this->_aliases, true)) {
            throw new DiException('`:name` service is being used by alias, please remove alias first', ['name' => $name]);
        }
        if (isset($this->_aliases[$name])) {
            unset($this->_aliases[$name]);
        } else {
            unset($this->_services[$name], $this->_sharedInstances[$name], $this->{$name});
        }
        return $this;
    }