/**
  * Take an instantiated Soap or LTI worker object and set the required options for it, then return the altered object.
  *
  * @param stdClass $service
  * @return stdClass
  */
 protected function setOptions($service)
 {
     $service->setLogPath($this->logpath);
     $service->setDebug($this->debug);
     $service->setAccountId($this->accountid);
     $service->setSharedKey($this->sharedkey);
     $service->setIntegrationId($this->integrationid);
     $service->setLanguage($this->language);
     if (isset($this->proxyhost) and $this->proxyhost != '') {
         $service->setProxyHost($this->proxyhost);
     }
     if (isset($this->proxyport) and $this->proxyport != '') {
         $service->setProxyPort($this->proxyport);
     }
     if (isset($this->proxytype) and $this->proxytype != '') {
         $service->setProxyType($this->proxytype);
     }
     if (isset($this->proxyuser) and $this->proxyuser != '') {
         $service->setProxyUser($this->proxyuser);
         $service->setProxyPassword($this->proxypassword);
     }
     if (isset($this->proxybypass) and $this->proxybypass != '') {
         $service->setProxyBypass($this->proxybypass);
     }
     if (isset($this->sslcertificate) and $this->sslcertificate != '') {
         $service->setSSLCertificate($this->sslcertificate);
     }
     $service->setIntegrationVersion($this->integrationversion);
     $service->setPluginVersion($this->pluginversion);
     $service->setTestingConnection($this->testingconnection);
     $service->setPerformanceLog($this->performancelog);
     return $service;
 }