From 597cadab6d19ddfede5b153d7c4cb4610c0d69b4 Mon Sep 17 00:00:00 2001 From: Piotr Date: Sun, 1 Jul 2012 02:24:12 +0200 Subject: [PATCH] Assign session creation response to public variable. Makes it possible to read attributes like: ``$inactivity = (int) $xmppPrebind->response->getAttribute('inactivity') ?: null;`` --- lib/XmppPrebind.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/XmppPrebind.php b/lib/XmppPrebind.php index 1df19ed..8110ba7 100644 --- a/lib/XmppPrebind.php +++ b/lib/XmppPrebind.php @@ -65,6 +65,12 @@ class XmppPrebind { protected $mechanisms = array(); + /** + * Session creation response + * + * @var DOMDocument + */ + public $response; /** * Create a new XmppPrebind Object with the required params @@ -144,6 +150,9 @@ public function connect($username, $password) { } $this->debug($this->encryption, 'encryption used'); + + // Assign session creation response + $this->response = $body; } /**