Author: Aurelien FOUCRET (aurelien.foucret@smile.fr)
Example #1
0
 /**
  * {@inheritdoc}
  *
  * @SuppressWarnings(PHPMD.StaticAccess)
  */
 public function createClient()
 {
     if ($this->client === null) {
         $clientBuilder = ClientBuilder::create();
         $hosts = $this->getHosts();
         $clientBuilder->setHosts($hosts);
         if ($this->clientConfiguration->isDebugModeEnabled()) {
             $clientBuilder->setLogger($this->logger);
         }
         $this->client = $clientBuilder->build();
     }
     return $this->client;
 }