Skip to content

Commit

Permalink
Issue #3 by [email protected]: Modified NTLMSoapClient_Exchange…
Browse files Browse the repository at this point in the history
…::__construct() to handle the version property and set it as a SOAP header.
  • Loading branch information
jamesiarmes committed Sep 30, 2011
1 parent d7e17ed commit 07159e8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions NTLMSoapClient/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class NTLMSoapClient_Exchange extends NTLMSoapClient {
*
* @var string
*/
protected $user;
protected $user;

/**
* password for authentication on the exchnage server
* Password for authentication on the exchnage server
*
* @var string
*/
protected $password;
protected $password;

/**
* Constructor
Expand All @@ -44,6 +44,13 @@ public function __construct($wsdl, $options) {
$this->user = $options['user'];
$this->password = $options['password'];

// if a version was set then add it to the headers
if (!empty($options['version'])) {
$this->__default_headers[] = new SoapHeader(
'http://schemas.microsoft.com/exchange/services/2006/types',
'RequestServerVersion Version="'.$options['version'].'"');
} // end if a version was set

parent::__construct($wsdl, $options);
} // end function __construct()
} // end class NTLMSoapClient_Exchange

0 comments on commit 07159e8

Please sign in to comment.