protected function unregisterInstance($key, $name)
    {
        if ($this->hasOption($key)) {
            $instances = $this->getOption($key);

            if (($index = array_search($name, $instances)) !== false) {
                unset($instances[$index]);
                $this->setOption($key, $instances);
                $this->registerMetadataService();
            }
        }
    }
protected function unregisterInstance($key, $name)
    {
        if ($this->hasOption($key)) {
            $instances = $this->getOption($key);

            if (($index = array_search($name, $instances)) !== false) {
                unset($instances[$index]);
                $this->setOption($key, $instances);
                $this->registerMetadataService();
            }
        }
    }
protected function unregisterInstance ( $ key , $ name ) { if ( $ this -> hasOption ( $ key ) ) { $ instances = $ this -> getOption ( $ key ) ; if ( ( $ index = array_search ( $ name , $ instances ) ) !== false ) { unset ( $ instances [ $ index ] ) ; $ this -> setOption ( $ key , $ instances ) ; $ this -> registerMetadataService ( ) ; } } }
Unregister an instance

Unregister a $name instance into $key config

@param $key
@param $name
Unregister an instance