src/Observable.php
public function notify( $extras = null ) : IObservable
   {

      if ( 1 < \count( $this->_cache ) )
      {
         $this->_cache[] = $extras;
      }
      else
      {
         $this->_cache = $extras;
      }

      foreach ( $this->_observers as $ob )
      {
         $ob->onUpdate( $this, $this->_cache );
      }

      $this->_cache = [];

      return $this;

   }
public function notify( $extras = null ) : IObservable
   {

      if ( 1 < \count( $this->_cache ) )
      {
         $this->_cache[] = $extras;
      }
      else
      {
         $this->_cache = $extras;
      }

      foreach ( $this->_observers as $ob )
      {
         $ob->onUpdate( $this, $this->_cache );
      }

      $this->_cache = [];

      return $this;

   }
public function notify ( $ extras = null ) : IObservable { if ( 1 < \ count ( $ this -> _cache ) ) { $ this -> _cache [ ] = $ extras ; } else { $ this -> _cache = $ extras ; } foreach ( $ this -> _observers as $ ob ) { $ ob -> onUpdate ( $ this , $ this -> _cache ) ; } $ this -> _cache = [ ] ; return $ this ; }
Notify all subscribed observers

@param  mixed $extras
@return \Niirrty\Observer\IObservable
Notify all subscribed observers