public static function removeListener($callback, $eventName, $priority = EventPriority::NORMAL)
    {
        if (EventPriority::getPriority($priority) == false) {
            throw new EventException('Unknown priority '.$priority);
        }

        if (!isset(self::$listeners[$eventName]) || !isset(self::$listeners[$eventName][$priority])) {
            return;
        }

        foreach (self::$listeners[$eventName][$priority] as $i => $_callback) {
            if ($_callback[0] == $callback) {
                unset(self::$listeners[$eventName][$priority][$i]);

                return;
            }
        }
    }