yii\di\ServiceLocator::clear PHP Method

clear() public method

Removes the component from the locator.
public clear ( string $id )
$id string the component ID
    public function clear($id)
    {
        unset($this->_definitions[$id], $this->_components[$id]);
    }