/**
  * Updates session object with required stateful elements such as cookie and nonce.
  *
  * @param \BroadworksOCIP\Session\Session $session
  */
 public function updateSession(Session &$session)
 {
     $session->setTransport('SOAP');
     if ($this->getResponse()) {
         preg_match('/<sessionId xmlns="">(\\d+)</sessionId>/', html_entity_decode($this->response->getBody()), $sessionMatch);
         $session->setSessionId($sessionMatch[1]);
         $session->setNonce($this->getResponse()->getNonce());
         $session->setUrl($this->response->getEffectiveUrl());
     }
     $this->session =& $session;
 }
 /**
  * Updates session with the transport type.
  *
  * @param \BroadworksOCIP\Session\Session $session
  */
 public function updateSession(Session &$session)
 {
     $session->setTransport('TCP');
     $this->session =& $session;
 }