public function unsubscribe($signal, $callback = null)
  {
    if(!$this->hasHandlers($signal))
    {
      return;
    }

    if($callback !== null)
    {
      $index = $this->getCallbackHash($callback);

      if(!array_key_exists($index, $this->sigslots[$signal]))
      {
        return;
      }

      unset($this->sigslots[$signal][$index]);
    }
    else
    {
      unset($this->sigslots[$signal]);
    }
  }
public function unsubscribe($signal, $callback = null)
  {
    if(!$this->hasHandlers($signal))
    {
      return;
    }

    if($callback !== null)
    {
      $index = $this->getCallbackHash($callback);

      if(!array_key_exists($index, $this->sigslots[$signal]))
      {
        return;
      }

      unset($this->sigslots[$signal][$index]);
    }
    else
    {
      unset($this->sigslots[$signal]);
    }
  }
public function unsubscribe ( $ signal , $ callback = null ) { if ( ! $ this -> hasHandlers ( $ signal ) ) { return ; } if ( $ callback !== null ) { $ index = $ this -> getCallbackHash ( $ callback ) ; if ( ! array_key_exists ( $ index , $ this -> sigslots [ $ signal ] ) ) { return ; } unset ( $ this -> sigslots [ $ signal ] [ $ index ] ) ; } else { unset ( $ this -> sigslots [ $ signal ] ) ; } }
Unsubscribes from a signal.

@param  string $signal
@param  mixed  $callback
@return void
Unsubscribes from a signal .