protected function doAttach($event, IObserver $observer)
    {
        if (!array_key_exists($event, $this->_observers)) {
            $this->_observers[$event] = array();
        }

        if (in_array($observer, $this->_observers[$event], true)) {
            return;
        }

        array_push($this->_observers[$event], $observer);
    }
protected function doAttach($event, IObserver $observer)
    {
        if (!array_key_exists($event, $this->_observers)) {
            $this->_observers[$event] = array();
        }

        if (in_array($observer, $this->_observers[$event], true)) {
            return;
        }

        array_push($this->_observers[$event], $observer);
    }
protected function doAttach ( $ event , IObserver $ observer ) { if ( ! array_key_exists ( $ event , $ this -> _observers ) ) { $ this -> _observers [ $ event ] = array ( ) ; } if ( in_array ( $ observer , $ this -> _observers [ $ event ] , true ) ) { return ; } array_push ( $ this -> _observers [ $ event ] , $ observer ) ; }
Do the actual work of attaching the listener.
@param string    $event    The event.
@param IObserver $observer The listener.
Do the actual work of attaching the listener .