BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
Elasticsearch\ClientBuilder Class Reference

Public Member Functions

 getTransport ()
 
 getEndpoint ()
 
 getRegisteredNamespacesBuilders ()
 
 setConnectionFactory (ConnectionFactoryInterface $connectionFactory)
 
 setConnectionPool ($connectionPool, array $args=[])
 
 setEndpoint ($endpoint)
 
 registerNamespace (NamespaceBuilderInterface $namespaceBuilder)
 
 setTransport ($transport)
 
 setHandler ($handler)
 
 setLogger ($logger)
 
 setTracer ($tracer)
 
 setSerializer ($serializer)
 
 setHosts ($hosts)
 
 setConnectionParams (array $params)
 
 setRetries ($retries)
 
 setSelector ($selector)
 
 setSniffOnStart ($sniffOnStart)
 
 setSSLCert ($cert, $password=null)
 
 setSSLKey ($key, $password=null)
 
 setSSLVerification ($value=true)
 
 allowBadJSONSerialization ()
 

Static Public Member Functions

static create ()
 
static fromConfig ($config, $quiet=false)
 
static defaultHandler ($multiParams=[], $singleParams=[])
 
static multiHandler ($params=[])
 
static singleHandler ()
 
static defaultLogger ($path, $level=Logger::WARNING)
 

Protected Member Functions

 instantiate (Transport $transport, callable $endpoint, array $registeredNamespaces)
 

Member Function Documentation

static Elasticsearch\ClientBuilder::create ( )
static
Returns
ClientBuilder
static Elasticsearch\ClientBuilder::defaultHandler (   $multiParams = [],
  $singleParams = [] 
)
static
Parameters
array$singleParams
array$multiParams
Exceptions
\RuntimeException
Returns
callable
static Elasticsearch\ClientBuilder::defaultLogger (   $path,
  $level = Logger::WARNING 
)
static
Parameters
$pathstring
Returns
static Elasticsearch\ClientBuilder::fromConfig (   $config,
  $quiet = false 
)
static

Build a new client from the provided config. Hash keys should correspond to the method name e.g. ['connectionPool'] corresponds to setConnectionPool().

Missing keys will use the default for that setting if applicable

Unknown keys will throw an exception by default, but this can be silenced by setting quiet to true

Parameters
array$confighash of settings
bool$quietFalse if unknown settings throw exception, true to silently ignore unknown settings
Exceptions
Common\Exceptions\RuntimeException
Returns
Elasticsearch\ClientBuilder::getEndpoint ( )

Can supply second parm to Client::__construct() when invoking manually or with dependency injection

Returns
this->endpoint
Elasticsearch\ClientBuilder::getRegisteredNamespacesBuilders ( )

Can supply third parm to Client::__construct() when invoking manually or with dependency injection

Returns
this->registeredNamespacesBuilders
Elasticsearch\ClientBuilder::getTransport ( )

Can supply first parm to Client::__construct() when invoking manually or with dependency injection

Returns
this->ransport
Elasticsearch\ClientBuilder::instantiate ( Transport  $transport,
callable  $endpoint,
array  $registeredNamespaces 
)
protected
Parameters
Transport$transport
callable$endpoint
Object[]$registeredNamespaces
Returns
Client
static Elasticsearch\ClientBuilder::multiHandler (   $params = [])
static
Parameters
array$params
Exceptions
\RuntimeException
Returns
CurlMultiHandler
Elasticsearch\ClientBuilder::registerNamespace ( NamespaceBuilderInterface  $namespaceBuilder)
Parameters
NamespaceBuilderInterface$namespaceBuilder
Returns
$this
Elasticsearch\ClientBuilder::setConnectionFactory ( ConnectionFactoryInterface  $connectionFactory)
Parameters
\Elasticsearch\Connections\ConnectionFactoryInterface$connectionFactory
Returns
$this
Elasticsearch\ClientBuilder::setConnectionParams ( array  $params)
Parameters
array$params
Returns
$this
Elasticsearch\ClientBuilder::setConnectionPool (   $connectionPool,
array  $args = [] 
)
Parameters
\Elasticsearch\ConnectionPool\AbstractConnectionPool | string$connectionPool
array$args
Exceptions
\InvalidArgumentException
Returns
$this
Elasticsearch\ClientBuilder::setEndpoint (   $endpoint)
Parameters
callable$endpoint
Returns
$this
Elasticsearch\ClientBuilder::setHandler (   $handler)
Parameters
mixed$handler
Returns
$this
Elasticsearch\ClientBuilder::setHosts (   $hosts)
Parameters
array$hosts
Returns
$this
Elasticsearch\ClientBuilder::setLogger (   $logger)
Parameters
\Psr\Log\LoggerInterface$logger
Returns
$this
Elasticsearch\ClientBuilder::setRetries (   $retries)
Parameters
int$retries
Returns
$this
Elasticsearch\ClientBuilder::setSelector (   $selector)
Parameters
\Elasticsearch\ConnectionPool\Selectors\SelectorInterface | string$selector
Exceptions
\InvalidArgumentException
Returns
$this
Elasticsearch\ClientBuilder::setSerializer (   $serializer)
Parameters
\Elasticsearch\Serializers\SerializerInterface | string$serializer
Exceptions
\InvalidArgumentException
Returns
$this
Elasticsearch\ClientBuilder::setSniffOnStart (   $sniffOnStart)
Parameters
boolean$sniffOnStart
Returns
$this
Elasticsearch\ClientBuilder::setSSLCert (   $cert,
  $password = null 
)
Parameters
$cert
null | string$password
Returns
$this
Elasticsearch\ClientBuilder::setSSLKey (   $key,
  $password = null 
)
Parameters
$key
null | string$password
Returns
$this
Elasticsearch\ClientBuilder::setSSLVerification (   $value = true)
Parameters
bool | string$value
Returns
$this
Elasticsearch\ClientBuilder::setTracer (   $tracer)
Parameters
\Psr\Log\LoggerInterface$tracer
Returns
$this
Elasticsearch\ClientBuilder::setTransport (   $transport)
Parameters
\Elasticsearch\Transport$transport
Returns
$this
static Elasticsearch\ClientBuilder::singleHandler ( )
static
Returns
CurlHandler
Exceptions
\RuntimeException

The documentation for this class was generated from the following file: