PHP 클래스 Elastica\Response

Stores query time, and result array -> is given to result set, returned by ...
저자: Nicolas Ruflin ([email protected])
파일 보기 프로젝트 열기: ruflin/elastica 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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.

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