Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SoapClient] Added ability to add cURL options later #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion src/BeSimple/SoapClient/SoapClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ class SoapClient extends \SoapClient
*/
private $lastResponse = '';

/**
* Additional cURLs options.
*
* @var array
*/
private $requestOptions = array();

/**
* Soap kernel.
*
Expand Down Expand Up @@ -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;
}

/**
Expand Down