Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
adding user-supplied "soap_options" to createConnection in SforceBase…
Browse files Browse the repository at this point in the history
…Client.php to allow pass-thru options to SoapClient instantiation
  • Loading branch information
Aaron Bauman committed Sep 28, 2012
1 parent 04003da commit de2bc2d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions soapclient/SforceBaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,22 @@ public function printDebugInfo() {
* Connect method to www.salesforce.com
*
* @param string $wsdl Salesforce.com Partner WSDL
* @param object $proxy (optional) proxy settings with properties host, port,
* login and password
* @param array $soap_options (optional) Additional options to send to the
* SoapClient constructor. @see
* http://php.net/manual/en/soapclient.soapclient.php
*/
public function createConnection($wsdl, $proxy=null) {
public function createConnection($wsdl, $proxy=null, $soap_options=array()) {
$phpversion = substr(phpversion(), 0, strpos(phpversion(), '-'));

$soapClientArray = array (
$soapClientArray = array_merge(array (
'user_agent' => 'salesforce-toolkit-php/'.$this->version,
'encoding' => 'utf-8',
'trace' => 1,
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP
);
), $soap_options);

// We don't need to parse out any subversion suffix - e.g. "-01" since
// PHP type conversion will ignore it
Expand Down

0 comments on commit de2bc2d

Please sign in to comment.