src/Ciconia/Event/EmitterTrait.php
public function emit($event, $parameters)
    {
        if (!isset($this->callbacks[$event])) {
            return;
        }

        if (!$this->callbacks[$event][0]) {
            usort($this->callbacks[$event][1], function ($A, $B) {
                if ($A[0] == $B[0]) {
                    return 0;
                }

                return ($A[0] > $B[0]) ? 1 : -1;
            });

            $this->callbacks[$event][0] = true;
        }

        foreach ($this->callbacks[$event][1] as $item) {
            call_user_func_array($item[1], $this->buildParameters($parameters));
        }
    }
public function emit($event, $parameters)
    {
        if (!isset($this->callbacks[$event])) {
            return;
        }

        if (!$this->callbacks[$event][0]) {
            usort($this->callbacks[$event][1], function ($A, $B) {
                if ($A[0] == $B[0]) {
                    return 0;
                }

                return ($A[0] > $B[0]) ? 1 : -1;
            });

            $this->callbacks[$event][0] = true;
        }

        foreach ($this->callbacks[$event][1] as $item) {
            call_user_func_array($item[1], $this->buildParameters($parameters));
        }
    }
Execute each of the subscribed listeners

@param string $event      The name of the event to emit
@param array  $parameters The arguments