src/Auth/SessionAuth.php
function set($key, $value, $expire = 0)
    {
        if (is_array($value)) {
            $value = json_encode($value);
        }

        $_SESSION[$key] = $value;
        return true;
    }
function set($key, $value, $expire = 0)
    {
        if (is_array($value)) {
            $value = json_encode($value);
        }

        $_SESSION[$key] = $value;
        return true;
    }
设置session的值

@param string $key
@param string|array $value
@param int $expire
@return bool|mixed