public static function retrieve(array $server = null)
    {
        if (empty($server)) {
            $server = $_SERVER;
        }

        $scheme = 'http';

        if (isset($server['HTTPS']) && 'off' != $server['HTTPS']) {
            $scheme = 'https';
        }

        return $scheme;
    }