Example #1
0
 /**
  * Gets the soap client with the headers attached
  *
  * Will automatically login if haven't already on this instance
  *
  * @since 0.0.1
  *
  * @param string|null $wsdl the wsdl to use. If null, the clusterWSDL is used.
  * @access public
  * @return \SoapClient
  */
 public function getClient($wsdl = null)
 {
     if (!$this->processed) {
         $this->process();
     }
     $wsdl = is_null($wsdl) ? $this->clusterWSDL : $wsdl;
     $header = $this->getHeader();
     // Makes a new client, and assigns the header to it
     $client = new SoapClient(sprintf($wsdl, $this->cluster), $this->config->getSoapClientOptions());
     $client->__setSoapHeaders($header);
     return $client;
 }