public function unregister($key, $name)
    {
        if (empty($key) || empty($name)) {
            throw new \common_Exception(__('Unregister method expects $key and $name parameters.'));
        }

        if (is_object($name)) {
            $name = get_class($name);
        }

        switch ($key) {
            case self::GUARDIAN_KEY:
                $this->unregisterInstance(self::GUARDIAN_KEY, $name);
                return true;
                break;
            case self::CLASS_LOOKUP_KEY:
                $this->unregisterInstance(self::CLASS_LOOKUP_KEY, $name);
                return true;
                break;
        }
        return parent::unregister($key, $name);
    }
public function unregister($key, $name)
    {
        if (empty($key) || empty($name)) {
            throw new \common_Exception(__('Unregister method expects $key and $name parameters.'));
        }

        if (is_object($name)) {
            $name = get_class($name);
        }

        switch ($key) {
            case self::GUARDIAN_KEY:
                $this->unregisterInstance(self::GUARDIAN_KEY, $name);
                return true;
                break;
            case self::CLASS_LOOKUP_KEY:
                $this->unregisterInstance(self::CLASS_LOOKUP_KEY, $name);
                return true;
                break;
        }
        return parent::unregister($key, $name);
    }
public function unregister ( $ key , $ name ) { if ( empty ( $ key ) || empty ( $ name ) ) { throw new \ common_Exception ( __ ( 'Unregister method expects $key and $name parameters.' ) ) ; } if ( is_object ( $ name ) ) { $ name = get_class ( $ name ) ; } switch ( $ key ) { case self :: GUARDIAN_KEY : $ this -> unregisterInstance ( self :: GUARDIAN_KEY , $ name ) ; return true ; break ; case self :: CLASS_LOOKUP_KEY : $ this -> unregisterInstance ( self :: CLASS_LOOKUP_KEY , $ name ) ; return true ; break ; } return parent :: unregister ( $ key , $ name ) ; }
Unregister an instances

Look for GUARDIAN OR CLASS_LOOKUP key, otherwise fallback to parent

@param string $key
@param string $name
@return bool
@throws \common_Exception
Unregister an instances