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));
        }
    }