From 5fd375b3da717002ee2f87e982b66af8ef51de98 Mon Sep 17 00:00:00 2001 From: Timon F Date: Tue, 3 Feb 2015 10:47:45 +0100 Subject: [PATCH] [SoapClient] Added ability to add cURL options later --- src/BeSimple/SoapClient/SoapClient.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/BeSimple/SoapClient/SoapClient.php b/src/BeSimple/SoapClient/SoapClient.php index 0fa3c7d4..b2da324f 100644 --- a/src/BeSimple/SoapClient/SoapClient.php +++ b/src/BeSimple/SoapClient/SoapClient.php @@ -76,6 +76,13 @@ class SoapClient extends \SoapClient */ private $lastResponse = ''; + /** + * Additional cURLs options. + * + * @var array + */ + private $requestOptions = array(); + /** * Soap kernel. * @@ -255,7 +262,20 @@ protected function filterRequestHeaders(SoapRequest $soapRequest, array $headers */ protected function filterRequestOptions(SoapRequest $soapRequest) { - return array(); + return $this->requestOptions; + } + + /** + * Sets an additional cURL option for request. + * + * @param $key + * @param $value + * + * @return void + */ + public function setRequestOption($key, $value) + { + $this->requestOptions[$key] = $value; } /**