@@ -17,17 +17,19 @@ class ClientBuilder
1717 /**
1818 * Construct client builder with required parameters
1919 *
20- * @param string $wsdl Path to your Salesforce WSDL
21- * @param string $username Your Salesforce username
22- * @param string $password Your Salesforce password
23- * @param string $token Your Salesforce security token
20+ * @param string $wsdl Path to your Salesforce WSDL
21+ * @param string $username Your Salesforce username
22+ * @param string $password Your Salesforce password
23+ * @param string $token Your Salesforce security token
24+ * @param array $soapOptions Further options to be passed to the SoapClient
2425 */
25- public function __construct ($ wsdl , $ username , $ password , $ token )
26+ public function __construct ($ wsdl , $ username , $ password , $ token, array $ soapOptions = array () )
2627 {
2728 $ this ->wsdl = $ wsdl ;
2829 $ this ->username = $ username ;
2930 $ this ->password = $ password ;
3031 $ this ->token = $ token ;
32+ $ this ->soapOptions = $ soapOptions ;
3133 }
3234
3335 /**
@@ -52,7 +54,7 @@ public function withLog(LoggerInterface $log)
5254 public function build ()
5355 {
5456 $ soapClientFactory = new SoapClientFactory ();
55- $ soapClient = $ soapClientFactory ->factory ($ this ->wsdl );
57+ $ soapClient = $ soapClientFactory ->factory ($ this ->wsdl , $ this -> soapOptions );
5658
5759 $ client = new Client ($ soapClient , $ this ->username , $ this ->password , $ this ->token );
5860
@@ -64,4 +66,3 @@ public function build()
6466 return $ client ;
6567 }
6668}
67-
0 commit comments