src/Observable.php
public function subscribe( IObserver $observer ) : IObservable
   {

      if ( ! \in_array( $observer, $this->_observers, true ) )
      {
         $this->_observers[] = $observer;
      }

      return $this;

   }
public function subscribe( IObserver $observer ) : IObservable
   {

      if ( ! \in_array( $observer, $this->_observers, true ) )
      {
         $this->_observers[] = $observer;
      }

      return $this;

   }
public function subscribe ( IObserver $ observer ) : IObservable { if ( ! \ in_array ( $ observer , $ this -> _observers , true ) ) { $ this -> _observers [ ] = $ observer ; } return $ this ; }
Subscribe a new observer to this observable implementation.

@param  \Niirrty\Observer\IObserver $observer
@return \Niirrty\Observer\IObservable
Subscribe a new observer to this observable implementation .