public static function fromArray(array $data)
    {
        $cookieJar = null;
        if (isset($data['cookies'])) {
            $cookieJar = new CookieJar();
            foreach ($data['cookies'] as $cookie) {
                $cookieJar->setCookie(new SetCookie($cookie));
            }
        }

        return new static($data['ptWebQQ'], $data['vfWebQQ'],
            $data['pSessionId'], $data['uin'], $data['clientId'],
            $cookieJar
        );
    }