public function detach(SplObserver $observer)
    {
        $key = array_search($observer, $this->observers, true);
        
        if ($key === false) {
            throw new Exception(
                'The observer has not been found.',
                self::ERR_OBSERVER_NOT_FOUND
            );
        }
        
        unset($this->observers[$key]);
    }
public function detach(SplObserver $observer)
    {
        $key = array_search($observer, $this->observers, true);
        
        if ($key === false) {
            throw new Exception(
                'The observer has not been found.',
                self::ERR_OBSERVER_NOT_FOUND
            );
        }
        
        unset($this->observers[$key]);
    }
public function detach ( SplObserver $ observer ) { $ key = array_search ( $ observer , $ this -> observers , true ) ; if ( $ key === false ) { throw new Exception ( 'The observer has not been found.' , self :: ERR_OBSERVER_NOT_FOUND ) ; } unset ( $ this -> observers [ $ key ] ) ; }
Detach a observer to the list

@param \SplObserver $observer The observer instance to detach

@return void
Detach a observer to the list