src/Query.php
/**
     * Establishes the ES client using the provided config.
     * Provided config values will take place over the object's config attribute.
     * Finally, the defaults() result will be used as a final config source.
     * 
     * @param array $config Config value to override the general config params
     * @return Client
     */
Establishes the ES client using the provided config.
Provided config values will take place over the object's config attribute.
Finally, the defaults() result will be used as a final config source.

@param array $config Config value to override the general config params
@return Client
Establishes the ES client using the provided config . Provided config values will take place over the object ' s config attribute . Finally the defaults () result will be used as a final config source . @param array $config Config value to override the general config params @return Client
public function establish(array $config = [], $assign = false) {
        $client = new Client($config + $this->config + $this->defaults());
        if ($assign) {
            $this->client = $client;
        }
        return $client;
    }
public function establish ( array $ config = [ ] , $ assign = false ) { $ client = new Client ( $ config + $ this -> config + $ this -> defaults ( ) ) ; if ( $ assign ) { $ this -> client = $ client ; } return $ client ; }
Establishes the ES client using the provided config.
Establishes the ES client using the provided config .