include/SugarSearchEngine/Elastic/Elastica/Request.php

Show: inherited
Table of Contents

Elastica Request object

Author
Nicolas Ruflin  
Category
Xodoa  
Package
Elastica  

\Elastica_Request

Package: Elastica

Elastica Request object

Author
Nicolas Ruflin  
Category
Xodoa  

Constants

Constant  POST = 'POST'
Constant  PUT = 'PUT'
Constant  GET = 'GET'
Constant  DELETE = 'DELETE'

Properties

Propertyprotected  $_client= ''
Details
Type
n/a
Propertyprotected  $_data= ''
Details
Type
n/a
Propertyprotected  $_method= ''
Details
Type
n/a
Propertyprotected  $_path= ''
Details
Type
n/a
Propertyprotectedint  $_serverId= 'null'
static

Internal id of last used server. This is used for round robin

Last server id
Default valuenullDetails
Type
int

Methods

methodpublic__construct( \Elastica_Client $client, string $path, string $method, array $data = array() ) : void

Parameters
Name Type Description
$client \Elastica_Client
$path string

Request path

$method string

Request method (use const's)

$data array

Data array

methodpublicgetClient( ) : \Elastica_Client

Returns
Type Description
\Elastica_Client
methodpublicgetConfig( string $key = '' ) : array | string

Returns a specific config key or the whole config array if not set

Parameters
Name Type Description
$key string

Config key

Returns
Type Description
array | string Config value
methodpublicgetData( ) : array

Returns
Type Description
array Request data
methodpublicgetMethod( ) : string

Returns
Type Description
string Request method
methodpublicgetPath( ) : string

Returns
Type Description
string Request path
methodpublicgetTransport( ) : \Elastica_Transport_Abstract

Returns an instance of the transport type

Returns
Type Description
\Elastica_Transport_Abstract Transport object
Throws
Exception Description
\Elastica_Exception_Invalid If invalid transport type
methodpublicsend( ) : \Elastica_Response

Sends request to server

Returns
Type Description
\Elastica_Response Response object
methodpublicsetData( array $data ) : void

Sets the request data

Parameters
Name Type Description
$data array

Request data

methodpublicsetMethod( string $method ) : \Elastica_Request

Sets the request method. Use one of the for consts

Parameters
Name Type Description
$method string

Request method

Returns
Type Description
\Elastica_Request Current object
methodpublicsetPath( string $path ) : \Elastica_Request

Sets the request path

Parameters
Name Type Description
$path string

Request path

Returns
Type Description
\Elastica_Request Current object
Documentation was generated by DocBlox 0.18.1.