public function clear($name = null) {
        if ($name !== null) {
            unset($this->events[$name]);
            unset($this->filters[$name]);
        }
        else {
            $this->events = array();
            $this->filters = array();
        }
    }
public function clear($name = null) {
        if ($name !== null) {
            unset($this->events[$name]);
            unset($this->filters[$name]);
        }
        else {
            $this->events = array();
            $this->filters = array();
        }
    }
public function clear ( $ name = null ) { if ( $ name !== null ) { unset ( $ this -> events [ $ name ] ) ; unset ( $ this -> filters [ $ name ] ) ; } else { $ this -> events = array ( ) ; $ this -> filters = array ( ) ; } }
Clears an event. If no name is given,
all events are removed.

@param string $name Event name
Clears an event . If no name is given all events are removed .