diff options
author | Filipp Lepalaan <filipp@mac.com> | 2011-05-03 20:32:36 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2011-05-03 20:32:36 +0300 |
commit | 650cfad53a1e24e08d02eaead58893e39765e208 (patch) | |
tree | 984edf7f783ad749169877c5f3fe9db7af9445d9 | |
parent | 7a1f4b614c1552b34ddb23f2bdac089280175b5a (diff) | |
download | gsxlib-650cfad53a1e24e08d02eaead58893e39765e208.tar.gz gsxlib-650cfad53a1e24e08d02eaead58893e39765e208.tar.bz2 gsxlib-650cfad53a1e24e08d02eaead58893e39765e208.zip |
Added getSessionId() to read the GSX user session ID
-rw-r--r-- | gsxlib.php | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -72,7 +72,7 @@ class GsxLib // there's a session going, put the credentials in there if (session_id()) { $_SESSION['_gsxlib_session_id'] = $this->session_id; - $_SESSION['_gsxlib_session_timeout'] = time()+60*30; + $_SESSION['_gsxlib_session_timeout'] = time()+(60*30); } } @@ -147,6 +147,17 @@ class GsxLib } + /** + * return the GSX user session ID + * I still keep the property private since it should not be modified + * outside the constructor + * @return string GSX session ID + */ + public function getSessionId() + { + return $this->session_id; + } + private function request($req) { $result = false; @@ -158,7 +169,8 @@ class GsxLib $result = $this->client->$r($request); $resp = "{$r}Response"; return $result->$resp; - } catch (SoapFault $e) { + } + catch (SoapFault $e) { trigger_error($e->getMessage()); } |