diff options
author | rb-cohen <me@arronwoods.com> | 2015-05-13 15:38:15 +0100 |
---|---|---|
committer | rb-cohen <me@arronwoods.com> | 2015-05-13 15:38:15 +0100 |
commit | 7e809543eee98acbf12a462b86ae41e0c3502b3d (patch) | |
tree | d1ddff5ca1e90445c11b7aac82aa7a529422a7ea | |
parent | cd410f6a2305a2b025ab50e3c172dc36bb8c38ec (diff) | |
parent | 7a320072a92d0308fb32d4f892212eb0fa877854 (diff) | |
download | php-ssrs-7e809543eee98acbf12a462b86ae41e0c3502b3d.zip php-ssrs-7e809543eee98acbf12a462b86ae41e0c3502b3d.tar.gz php-ssrs-7e809543eee98acbf12a462b86ae41e0c3502b3d.tar.bz2 |
Merge pull request #16 from SmokeyBrandie/patch-4
Update NTLM.php
-rwxr-xr-x | library/SSRS/Soap/NTLM.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/library/SSRS/Soap/NTLM.php b/library/SSRS/Soap/NTLM.php index bf04288..a48b33b 100755 --- a/library/SSRS/Soap/NTLM.php +++ b/library/SSRS/Soap/NTLM.php @@ -13,6 +13,7 @@ class NTLM extends \SoapClient { protected $_cacheExpiry; protected $_lastRequest; protected $_lastResponse; + protected $_curlOptions; function __construct($wsdl, $options = array()) { if (empty($options['cache_wsdl_path'])) { @@ -29,6 +30,7 @@ class NTLM extends \SoapClient { $this->setUri($wsdl); $this->setCachePath($options['cache_wsdl_path']); + $this->setCurlOptions($options['curl_options']); } public function init() { @@ -115,6 +117,15 @@ class NTLM extends \SoapClient { $this->cacheWSDL($wsdlContent); } } + + public function setCurlOptions($curl_options) { + $this->_curlOptions = $curl_options; + } + + public function getCurlOptions() { + return $this->_curlOptions; + } + public function __doRequest($request, $location, $action, $version = 1, $one_way = null) { $this->_lastRequest = (string) $request; @@ -132,6 +143,11 @@ class NTLM extends \SoapClient { curl_setopt($handle, CURLOPT_USERPWD, $this->_username . ':' . $this->_passwd); curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true); curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_NTLM); + + //set additional curl options + foreach ($this->getCurlOptions() as $key => $value) { + curl_setopt($handle, $key, $value); + } $headers = $this->generateHeaders($url, $data, $action); curl_setopt($handle, CURLOPT_HTTPHEADER, $headers); |