public function dispatch()
    {
        if ($this->isDispatchable()) {

            $sorted = [];

            foreach($this->attachedToEvents as $eventName)
            {
                $sorted[$eventName] = $this->dispatchedEvents[$eventName];
            }

            call_user_func($this->listener, $sorted);
            if ($this->purge) {
                $this->dispatchedEvents = [];
            }
        }
    }