src/Auth/SessionAuth.php
function get($key, $deCode = false)
    {
        if (false !== strpos($key, ':') && $deCode) {
            list($key, $arrKey) = explode(':', $key);
        }

        if (!isset($_SESSION[$key])) {
            return false;
        }

        $result = $_SESSION[$key];
        if ($deCode) {
            $result = json_decode($result, true);
            if (isset($arrKey) && isset($result[$arrKey])) {
                return $result[$arrKey];
            }
        }

        return $result;
    }
function get($key, $deCode = false)
    {
        if (false !== strpos($key, ':') && $deCode) {
            list($key, $arrKey) = explode(':', $key);
        }

        if (!isset($_SESSION[$key])) {
            return false;
        }

        $result = $_SESSION[$key];
        if ($deCode) {
            $result = json_decode($result, true);
            if (isset($arrKey) && isset($result[$arrKey])) {
                return $result[$arrKey];
            }
        }

        return $result;
    }
获取session的值

@param string $key
@param bool $deCode
@return bool|mixed