获取一个 session 变量

@param string $key
@param mixed $default
@param bool $remove 是否获取完就删除掉
@return mixed
769365
public function get($key, $default = null, $remove = false)
    {
        if (isset($_SESSION[$key])) {
            return $remove ? $this->remove($key) : $_SESSION[$key];
        }

        return $default;
    }
1352906
public function session($name = null, $default = null) {
        if (null === $name) {
            return $_SESSION;
        }
        if (isset($_SESSION[$name])) {
            return $_SESSION[$name];
        }
        return $default;
    }
511784
public function getUserState($key, $default = null)
    {
        $session = JFactory::getSession();
        $registry = $session->get('registry');

        if (!is_null($registry))
        {
            return $registry->get($key, $default);
        }

        return $default;
    }
154572
public function get($key, $default = null) {
		$key = $this->getKey($key);
		$result = getConf($key);
		return $result === null ? $default : $result;
	}
711868
public function get($key = null, $default = null)
    {
        $this->start();

        if ($key) {
            return Arr::get($_SESSION, $key, $default);
        } else {
            return $this->getAll();
        }
    }
52800
public static function get($key, $default=null) {
		if( !isset(static::$main) ) {
			return $default;
		}
		return isset(static::$main->$key) ? static::$main->$key : $default;
	}
1136561
public function pluck($key, $default = null)
    {
        $value = $this->get($key, $default);

        $this->remove($key);

        return $value;
    }
20305
protected function getSession($key = null, $default = null)
    {
        $sessionId = $this->makeSessionId();

        $currentStore = [];

        if (
            Session::has($sessionId) &&
            ($cached = @unserialize(@base64_decode(Session::get($sessionId)))) !== false
        ) {
            $currentStore = $cached;
        }

        if ($key === null) {
            return $currentStore;
        }

        return $currentStore[$key] ?? $default;
    }
1317534
public function getDelete($key, $default_val = null)
    {
        if (isset($this->delete[$key])) {
            return $this->delete[$key];
        }

        return $default_val;
    }
107140
public function read(string $key, $defaultValue = null)
    {
        return isset($_SESSION[$key]) ? $_SESSION[$key] : $defaultValue;
    }
442066
static public function get($key,$default=null){
                if (($active = static::active()) && isset($_SESSION[$key])) {
			return $_SESSION[$key];
                } else if ($active) {
                	return $_SESSION[$key] = (is_callable($default)?call_user_func($default):$default);
                } else {
                 	return (is_callable($default)?call_user_func($default):$default);
                }
	}
301892
public function pull($key = null, $default = null)
    {
        if (is_null($key)) {
            $value = $this->all();
            $this->clear();

            return $value;
        }

        $value = $this->get($key, $default);
        $this->delete($key);

        return $value;
    }
1371351
public function remove($key)
    {
        if (isset($_SESSION[$this->name][$key])) {
            $value = $_SESSION[$this->name][$key];
            unset($_SESSION[$this->name][$key]);
            return $value;
        }

        return null;
    }
1109573
public function getFromCache($key, $default = null)
    {
        $key = $this->getConfigBasedCachePrefix() . $key;

        return $this->getFromCacheOld($key, $default);
    }
617887
public static function get(string $key, $default = false)
        {
            if (($cacheValue = self::GetInstance()->get("\$vxnKey:{$key}")) === false) {
                return $default;
            }

            foreach ($cacheValue['$_tags'] as $tagName => $ver) {
                if ($ver && $ver != self::tagGetVer($tagName)) {
                    self::GetInstance()->delete("\$vxnKey:{$key}");

                    return $default;
                }
            }

            return $cacheValue['$_data'];
        }
966597
public function remove($key) {
        $key = $this->secureKey($key);
        
        if (isset($_SESSION[$key])) unset($_SESSION[$key]);
        
        return $key;
    }
1275693
public static function getSessParam($key, $default = null)
  {
    return (array_key_exists($key, $_SESSION) && !empty($_SESSION[$key])) ? $_SESSION[$key] : $default;
  }