PHP Класс Elastica\Response

Stores query time, and result array -> is given to result set, returned by ...
Автор: Nicolas Ruflin ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_error Error.
$_jsonBigintConversion boolean Whether or not to convert bigint results to string (see issue #717).
$_queryTime Query time.
$_response array | null Response.
$_responseString Response string (json).
$_status integer HTTP response status code.
$_transferInfo Transfer info.

Открытые методы

Метод Описание
__construct ( string | array $responseString, integer $responseStatus = null ) Construct.
getData ( ) : array Response data array.
getEngineTime ( ) : integer Time request took.
getError ( ) : string Error message.
getErrorMessage ( ) : string
getFullError ( ) : array | string A keyed array representing any errors that occured.
getJsonBigintConversion ( ) : boolean Gets whether or not to apply bigint conversion on the JSON result.
getQueryTime ( ) : float Returns query execution time.
getScrollId ( ) : string Get the _scroll value for the response.
getShardsStatistics ( ) : array Get the _shard statistics for the response.
getStatus ( ) : integer
getTransferInfo ( ) : array Gets the transfer information.
hasError ( ) : boolean True if response has error.
hasFailedShards ( ) : boolean True if response has failed shards.
isOk ( ) : boolean Checks if the query returned ok.
setJsonBigintConversion ( boolean $jsonBigintConversion ) Sets whether or not to apply bigint conversion on the JSON result.
setQueryTime ( float $queryTime ) Sets the query time.
setTransferInfo ( array $transferInfo ) Sets the transfer info of the curl request. This function is called from the \Elastica\Client::_callService .

Описание методов

__construct() публичный Метод

Construct.
public __construct ( string | array $responseString, integer $responseStatus = null )
$responseString string | array Response string (json)
$responseStatus integer http status code

getData() публичный Метод

Response data array.
public getData ( ) : array
Результат array Response data array

getEngineTime() публичный Метод

Time request took.
public getEngineTime ( ) : integer
Результат integer Time request took

getError() публичный Метод

Error message.
public getError ( ) : string
Результат string Error message

getErrorMessage() публичный Метод

public getErrorMessage ( ) : string
Результат string Error string based on the error object

getFullError() публичный Метод

In case of http://localhost:9200/_alias/test the error is a string
public getFullError ( ) : array | string
Результат array | string Error data

getJsonBigintConversion() публичный Метод

Gets whether or not to apply bigint conversion on the JSON result.
public getJsonBigintConversion ( ) : boolean
Результат boolean

getQueryTime() публичный Метод

Returns query execution time.
public getQueryTime ( ) : float
Результат float Query time

getScrollId() публичный Метод

Get the _scroll value for the response.
public getScrollId ( ) : string
Результат string

getShardsStatistics() публичный Метод

Get the _shard statistics for the response.
public getShardsStatistics ( ) : array
Результат array

getStatus() публичный Метод

public getStatus ( ) : integer
Результат integer

getTransferInfo() публичный Метод

Gets the transfer information.
public getTransferInfo ( ) : array
Результат array Information about the curl request.

hasError() публичный Метод

True if response has error.
public hasError ( ) : boolean
Результат boolean True if response has error

hasFailedShards() публичный Метод

True if response has failed shards.
public hasFailedShards ( ) : boolean
Результат boolean True if response has failed shards

isOk() публичный Метод

Checks if the query returned ok.
public isOk ( ) : boolean
Результат boolean True if ok

setJsonBigintConversion() публичный Метод

Sets whether or not to apply bigint conversion on the JSON result.
public setJsonBigintConversion ( boolean $jsonBigintConversion )
$jsonBigintConversion boolean

setQueryTime() публичный Метод

Sets the query time.
public setQueryTime ( float $queryTime )
$queryTime float Query time

setTransferInfo() публичный Метод

Sets the transfer info of the curl request. This function is called from the \Elastica\Client::_callService .
public setTransferInfo ( array $transferInfo )
$transferInfo array The curl transfer information.

Описание свойств

$_error защищенное свойство

Error.
protected $_error

$_jsonBigintConversion защищенное свойство

Whether or not to convert bigint results to string (see issue #717).
protected bool $_jsonBigintConversion
Результат boolean

$_queryTime защищенное свойство

Query time.
protected $_queryTime

$_response защищенное свойство

Response.
protected array|null $_response
Результат array | null

$_responseString защищенное свойство

Response string (json).
protected $_responseString

$_status защищенное свойство

HTTP response status code.
protected int $_status
Результат integer

$_transferInfo защищенное свойство

Transfer info.
protected $_transferInfo