Pattern Registry PHP

Simple Registry class

class Registry
{
    private static $params;

    public static function setParams()
    {
        $params = [];

        if (isset($_COOKIE)) {
            foreach ($_COOKIE as $key => $value) {
                $params[$key] = $value;
            }
        }

        if (isset($_GET)) {
            $get = self::escapeParams($_GET);

            foreach ($get as $key => $value) {
                $params[$key] = $value;
            }
        }

        if (isset($_POST)) {
            $get = self::escapeParams($_POST);

            foreach ($get as $key => $value) {
                $params[$key] = $value;
            }
        }

        if (isset($_FILES)) {
            $get = self::escapeParams($_FILES);

            foreach ($get as $key => $value) {
                $params[$key] = $value;
            }
        }

        if (isset($_SERVER['HTTP_REFERER'])) {
            $params['HTTP_REFERER'] = $_SERVER['HTTP_REFERER'];
        }

        self::$params = $params;
    }

    public static function setParam($key, $value)
    {
        self::$params[$key] = $value;
    }

    public static function getParam($key, $value)
    {
        if (isset(self::$params[$key])) {
            return self::$params[$key];
        }

        return $value;
    }

    public static function escapeParams($get)
    {
        foreach ($get as $key => $value) {

            if (is_array($value)) {
                $get[$key] = self::escapeParams($value);
            } else {
                $get[$key] = mysql_escape_string($value);
            }
        }

        return $get;
    }

    public static function htmlSpecialCharsParams($get)
    {
        if (!isset($get) || !is_array($get)) return [];

        foreach ($get as $key => $value) {
            if (is_array($value)) {
                $get[$key] = self::htmlSpecialCharsParams($value);
            } else {
                $get[$key] = htmlspecialchars($value);
            }
        }

        return $get;
    }
}