Example #1
0
 /**
  * Build the Salesforce SOAP client
  *
  * @return Client
  */
 public function build()
 {
     $soapClientFactory = new SoapClientFactory();
     $soapClient = $soapClientFactory->factory($this->wsdl, $this->soapOptions);
     $client = new Client($soapClient, $this->username, $this->password, $this->token);
     if ($this->log) {
         $logPlugin = new LogPlugin($this->log);
         $client->getEventDispatcher()->addSubscriber($logPlugin);
     }
     return $client;
 }