diff options
author | SmokeyBrandie <mail@rogerbucher.ch> | 2015-05-13 13:20:16 +0200 |
---|---|---|
committer | SmokeyBrandie <mail@rogerbucher.ch> | 2015-05-13 13:20:16 +0200 |
commit | 7a320072a92d0308fb32d4f892212eb0fa877854 (patch) | |
tree | d1ddff5ca1e90445c11b7aac82aa7a529422a7ea | |
parent | cd410f6a2305a2b025ab50e3c172dc36bb8c38ec (diff) | |
download | php-ssrs-7a320072a92d0308fb32d4f892212eb0fa877854.zip php-ssrs-7a320072a92d0308fb32d4f892212eb0fa877854.tar.gz php-ssrs-7a320072a92d0308fb32d4f892212eb0fa877854.tar.bz2 |
Update NTLM.php
Add additional Curl options
-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); |