summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rwxr-xr-xlibrary/SSRS/Report.php4
-rwxr-xr-xlibrary/SSRS/Soap/NTLM.php17
2 files changed, 10 insertions, 11 deletions
diff --git a/library/SSRS/Report.php b/library/SSRS/Report.php
index d888473..2333d3a 100755
--- a/library/SSRS/Report.php
+++ b/library/SSRS/Report.php
@@ -64,7 +64,7 @@ class Report {
public function setOptions(array $options) {
$defaults = array(
'cache_wsdl_path' => null,
- 'curl_options' => null,
+ 'curl_options' => array(),
);
$this->options = array_merge($defaults, $options);
@@ -458,7 +458,7 @@ class Report {
'username' => $this->_username,
'password' => $this->_passwd,
'cache_wsdl_path' => $this->options['cache_wsdl_path'],
- 'curl_options' => $this->options['curl_options'],
+ 'curl_options' => $this->options['curl_options'],
);
$client = new SoapNTLM($this->_baseUri . '/' . $path, $options);
diff --git a/library/SSRS/Soap/NTLM.php b/library/SSRS/Soap/NTLM.php
index a48b33b..33b4fd6 100755
--- a/library/SSRS/Soap/NTLM.php
+++ b/library/SSRS/Soap/NTLM.php
@@ -13,7 +13,7 @@ class NTLM extends \SoapClient {
protected $_cacheExpiry;
protected $_lastRequest;
protected $_lastResponse;
- protected $_curlOptions;
+ protected $_curlOptions = array();
function __construct($wsdl, $options = array()) {
if (empty($options['cache_wsdl_path'])) {
@@ -117,15 +117,14 @@ class NTLM extends \SoapClient {
$this->cacheWSDL($wsdlContent);
}
}
-
- public function setCurlOptions($curl_options) {
- $this->_curlOptions = $curl_options;
+
+ public function setCurlOptions(array $curl_options) {
+ $this->_curlOptions = $curl_options;
}
-
+
public function getCurlOptions() {
- return $this->_curlOptions;
+ return $this->_curlOptions;
}
-
public function __doRequest($request, $location, $action, $version = 1, $one_way = null) {
$this->_lastRequest = (string) $request;
@@ -143,10 +142,10 @@ 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);
+ curl_setopt($handle, $key, $value);
}
$headers = $this->generateHeaders($url, $data, $action);