public function SoapClient::__construct in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 modules/salesforce_soap/src/Soap/SoapClient.php \Drupal\salesforce_soap\Soap\SoapClient::__construct()
- 5.0.x modules/salesforce_soap/src/Soap/SoapClient.php \Drupal\salesforce_soap\Soap\SoapClient::__construct()
Constructor which initializes the consumer.
Parameters
\Drupal\salesforce\Rest\RestClientInterface $rest_api: The Salesforce REST API client.
string $wsdl: (Optional) Path to the WSDL that should be used. Defaults to using the partner WSDL from the developerforce/force.com-toolkit-for-php package.
File
- modules/
salesforce_soap/ src/ Soap/ SoapClient.php, line 43
Class
- SoapClient
- A client for communicating with the Salesforce SOAP API.
Namespace
Drupal\salesforce_soap\SoapCode
public function __construct(RestClientInterface $rest_api, $wsdl = NULL) {
parent::__construct();
$this->restApi = $rest_api;
if ($wsdl) {
$this->wsdl = $wsdl;
}
else {
// Determine location of the developerforce/force.com-toolkit-for-php WSDL
// files.
$reflector = new \ReflectionClass('SforcePartnerClient');
$wsdl_dir = dirname($reflector
->getFileName());
// Use the partner WSDL.
$this->wsdl = "{$wsdl_dir}/partner.wsdl.xml";
}
}