public static function addWarning($code, $level = 1, $args = null)
    {
        if ($args === null) {
            // Callers may use null as well.
            $args = array();
        };
        if (!is_array($args)) {
            $args = array($args);
        };
        switch ($level) {
        case 0:
        case 1:
        case 2:
        case 3:
            break;
        default:
            $level = 1;
        };
        self::$_req['warnings'][] = array($level, $code, $args);
    }