flight\core\Dispatcher::clear PHP Method

clear() public method

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