PHP Класс Basho\Riak\Api\Http

Наследование: extends Basho\Riak\Api, implements Basho\Riak\ApiInterface
Показать файл Открыть проект

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

Свойство Тип Описание
$connection null cURL connection handle
$headers
$path string API path
$query string Query string
$requestBody string Request body to be sent
$responseBody string Response body returned from request
$responseHeaders array Response headers returned from request
$statusCode integer HTTP Status Code from response

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

Метод Описание
addHeader ( $key, $value ) Add a custom header to the request
closeConnection ( )
getConnection ( ) : resource
getPath ( ) : string
getQuery ( ) : string
getRequest ( ) : string
getResponseBody ( ) : string
getResponseHeaders ( ) : array
getStatusCode ( ) : integer
openConnection ( )
prepare ( Basho\Riak\Command $command, Node $node ) Prepare request to be sent
resetConnection ( )
responseBodyCallback ( $ch, $body ) : integer Response body callback
responseHeaderCallback ( $ch, $header ) : integer Response header callback
send ( ) : boolean

Защищенные методы

Метод Описание
buildPath ( ) Sets the API path for the command
getResponseHeader ( $key, $default = '' )
parseResponse ( )
prepareConnection ( ) Prepare Connection
prepareRequest ( ) Prepare request
prepareRequestData ( ) Prepare request data
prepareRequestHeaders ( ) Prepares the request headers
prepareRequestMethod ( ) Prepare the request method
prepareRequestParameters ( ) Prepare request parameters
prepareRequestUrl ( ) Prepares the complete request URL

Приватные методы

Метод Описание
createIndexQueryPath ( Basho\Riak\Bucket $bucket ) : string Generates the URL path for a 2i Query

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

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

Add a custom header to the request
public addHeader ( $key, $value )
$key
$value

buildPath() защищенный Метод

Sets the API path for the command
protected buildPath ( )

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

public closeConnection ( )

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

public getConnection ( ) : resource
Результат resource

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

public getPath ( ) : string
Результат string

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

public getQuery ( ) : string
Результат string

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

public getRequest ( ) : string
Результат string

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

public getResponseBody ( ) : string
Результат string

getResponseHeader() защищенный Метод

protected getResponseHeader ( $key, $default = '' )

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

public getResponseHeaders ( ) : array
Результат array

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

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

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

public openConnection ( )

parseResponse() защищенный Метод

protected parseResponse ( )

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

Prepare request to be sent
public prepare ( Basho\Riak\Command $command, Node $node )
$command Basho\Riak\Command
$node Basho\Riak\Node

prepareConnection() защищенный Метод

Sets general connection options that are used with every request
protected prepareConnection ( )

prepareRequest() защищенный Метод

Sets connection options that are specific to this request
protected prepareRequest ( )

prepareRequestData() защищенный Метод

Prepare request data
protected prepareRequestData ( )

prepareRequestHeaders() защищенный Метод

Prepares the request headers
protected prepareRequestHeaders ( )

prepareRequestMethod() защищенный Метод

Prepare the request method
protected prepareRequestMethod ( )

prepareRequestParameters() защищенный Метод

Prepare request parameters
protected prepareRequestParameters ( )

prepareRequestUrl() защищенный Метод

Prepares the complete request URL
protected prepareRequestUrl ( )

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

public resetConnection ( )

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

Handles callback from curl when the response is received, it sets the response body as a member of the class. Has to be public for curl to be able to access it.
public responseBodyCallback ( $ch, $body ) : integer
$ch
$body
Результат integer

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

Handles callback from curl when the response is received, it parses the headers into an array sets them as member of the class. Has to be public for curl to be able to access it.
public responseHeaderCallback ( $ch, $header ) : integer
$ch
$header
Результат integer

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

public send ( ) : boolean
Результат boolean

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

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

cURL connection handle
protected null $connection
Результат null

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

protected $headers

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

API path
protected string $path
Результат string

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

Query string
protected string $query
Результат string

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

Request body to be sent
protected string $requestBody
Результат string

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

Response body returned from request
protected string $responseBody
Результат string

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

Response headers returned from request
protected array $responseHeaders
Результат array

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

HTTP Status Code from response
protected int $statusCode
Результат integer