Phpro\SoapClient\ClientFactoryInterface::factory PHP Method

factory() public method

public factory ( SoapClient $soapClient, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher ) : ClientInterface
$soapClient SoapClient
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
return ClientInterface
    public function factory(SoapClient $soapClient, EventDispatcherInterface $dispatcher);

Usage Example

Example #1
0
 /**
  * @return ClientInterface
  */
 public function build()
 {
     $soapClientFactory = new SoapClientFactory($this->classMaps, $this->converters);
     $soapClient = $soapClientFactory->factory($this->wsdl, $this->soapOptions);
     if ($this->logger) {
         $this->dispatcher->addSubscriber(new LogPlugin($this->logger));
     }
     return $this->clientFactory->factory($soapClient, $this->dispatcher);
 }
ClientFactoryInterface