public function detach($event)
    {
        if ($this->has($event)) {
            unset($this->listeners[$event]);
        } else {
            throw new RuntimeException(sprintf(
                'Cannot detach non-existing event "%s"', $event
            ));
        }
    }
public function detach($event)
    {
        if ($this->has($event)) {
            unset($this->listeners[$event]);
        } else {
            throw new RuntimeException(sprintf(
                'Cannot detach non-existing event "%s"', $event
            ));
        }
    }
public function detach ( $ event ) { if ( $ this -> has ( $ event ) ) { unset ( $ this -> listeners [ $ event ] ) ; } else { throw new RuntimeException ( sprintf ( 'Cannot detach non-existing event "%s"' , $ event ) ) ; } }
Detaches an event

@param string $event Event name
@throws \RuntimeException If attempted to detach non-existing event
@return void
Detaches an event