Smile\ElasticsuiteCore\Client\ClientFactory::createClient PHP Method

createClient() public method

public createClient ( )
    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;
    }