public function addListener($name, $listener, $priority = 0)
    {
        if (! isset($this->listeners[$name])) $this->listeners[$name] = [];
        $this->listeners[$name][$priority][] = $listener;
    }