public static function addListener($callback, $eventName, $priority = EventPriority::NORMAL)
    {
        // Perform multiple checks
        if (EventPriority::getPriority($priority) == false) {
            throw new EventException('Can not add listener: Unknown priority '.$priority, 1);
        }

        if (!is_callable($callback))
        {
            throw new EventException("Can not add listener: Callback is not callable", 1);
        }

        if (empty($eventName))
        {
            throw new EventException("Can not add listener: No eventname provided", 1);
        }

        if (!isset(self::$listeners[$eventName])) {
            self::$listeners[$eventName] = array();
        }

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

        if (func_num_args() > 3) {
            $args = array_slice(func_get_args(), 3);
        }
        else
        {
            $args = array();
        }

        self::$listeners[$eventName][$priority][] = array($callback, $args);
    }