From c387b6997870ac1c6444ac56f1786e13a7d0dbce Mon Sep 17 00:00:00 2001 From: MatthewReed Date: Fri, 22 Jan 2016 14:55:43 +0100 Subject: [PATCH] populate clientId field added clientId field in connect method --- src/FuseSource/Stomp/Stomp.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/FuseSource/Stomp/Stomp.php b/src/FuseSource/Stomp/Stomp.php index 29491e7..90fa2a5 100755 --- a/src/FuseSource/Stomp/Stomp.php +++ b/src/FuseSource/Stomp/Stomp.php @@ -187,10 +187,11 @@ protected function _makeConnection () * * @param string $username * @param string $password + * @param string $clientId * @return boolean * @throws StompException */ - public function connect ($username = '', $password = '') + public function connect ($username = '', $password = '', $clientId = null) { $this->_makeConnection(); if ($username != '') { @@ -199,6 +200,10 @@ public function connect ($username = '', $password = '') if ($password != '') { $this->_password = $password; } + if(!\is_null($clientId)) ++ { ++ $this->clientId = $clientId; ++ } $headers = array('login' => $this->_username , 'passcode' => $this->_password); if ($this->clientId != null) { $headers["client-id"] = $this->clientId;