Official Riak Client for PHP
  • Namespace
  • Class
  • Tree

Namespaces

  • Basho
    • Riak
      • Api
        • Http
          • Translator
      • Command
        • Bucket
        • Builder
          • MapReduce
          • Search
          • TimeSeries
        • DataType
          • Counter
          • Map
          • Set
        • Indexes
        • MapReduce
        • Object
        • Search
          • Index
          • Schema
        • Stats
        • TimeSeries
          • Query
      • DataType
      • Node
        • Builder
      • Search
      • TimeSeries

Classes

  • Http

Exceptions

  • Exception

Class Http

Handles communications between end user app & Riak via Riak HTTP API using cURL

Basho\Riak\Api
Extended by Basho\Riak\Api\Http implements Basho\Riak\ApiInterface
Namespace: Basho\Riak\Api
Author: Christopher Mancini
Located at Riak/Api/Http.php

Methods summary

public integer
# getStatusCode( )

Returns

integer
public string
# getResponseBody( )

Returns

string
public array
# getResponseHeaders( )

Returns

array
public string
# getRequest( )

Returns

string

Overrides

Basho\Riak\Api::getRequest

Implementation of

Basho\Riak\ApiInterface::getRequest()
public null
# closeConnection( )

Closes the connection to the Riak Interface

Closes the connection to the Riak Interface

Returns

null

Implementation of

Basho\Riak\ApiInterface::closeConnection()
public
# prepare( Basho\Riak\Command $command, Basho\Riak\Node $node )

Prepare request to be sent

Prepare request to be sent

Parameters

$command
$node

Returns


$this

Overrides

Basho\Riak\Api::prepare

Implementation of

Basho\Riak\ApiInterface::prepare()
public
# resetConnection( )
protected
# buildPath( )

Sets the API path for the command

Sets the API path for the command

Returns


$this
protected
# prepareConnection( )

Prepare Connection

Prepare Connection

Sets general connection options that are used with every request

Returns


$this

Throws

Basho\Riak\Api\Exception
protected
# prepareRequest( )

Prepare request

Prepare request

Sets connection options that are specific to this request

Returns


$this
protected
# prepareRequestData( )

Prepare request data

Prepare request data

Returns


$this
protected
# prepareRequestUrl( )

Prepares the complete request URL

Prepares the complete request URL

Returns


$this
protected
# prepareRequestParameters( )

Prepare request parameters

Prepare request parameters

Returns


$this
protected
# prepareRequestHeaders( )

Prepares the request headers

Prepares the request headers

Returns


$this
protected
# prepareRequestMethod( )

Prepare the request method

Prepare the request method

Returns


$this
public string
# getPath( )

Returns

string
public string
# getQuery( )

Returns

string
public boolean
# send( )

Returns

boolean

Implementation of

Basho\Riak\ApiInterface::send()
public
# addHeader( $key, $value )

Add a custom header to the request

Add a custom header to the request

Parameters

$key
$value
public resource
# getConnection( )

Returns

resource
public
# openConnection( )
public integer
# responseHeaderCallback( $ch, $header )

Response header callback

Response header callback

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.

Parameters

$ch
$header

Returns

integer
public integer
# responseBodyCallback( $ch, $body )

Response body callback

Response body callback

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.

Parameters

$ch
$body

Returns

integer
protected
# parseResponse( )
protected
# getResponseHeader( $key, $default = '' )

Methods inherited from Basho\Riak\Api

__construct(), getCommand(), getConfig(), getError(), getNode(), getResponse(), getSuccess(), setCommand(), setNode()

Constants summary

string VCLOCK_KEY
# 'X-Riak-Vclock'
string CONTENT_TYPE_KEY
# 'Content-Type'
string METADATA_PREFIX
# 'X-Riak-Meta-'
string LAST_MODIFIED_KEY
# 'Last-Modified'
string CONTENT_TYPE_JSON
# 'application/json'
string CONTENT_TYPE_XML
# 'application/xml'
string TS_API_PREFIX
# '/ts/v1/'

Properties summary

protected string $requestBody

Request body to be sent

Request body to be sent

# ''
protected array $responseHeaders

Response headers returned from request

Response headers returned from request

# []
protected string $responseBody

Response body returned from request

Response body returned from request

# ''
protected integer $statusCode

HTTP Status Code from response

HTTP Status Code from response

# 0
protected null $connection

cURL connection handle

cURL connection handle

# null
protected string $path

API path

API path

# ''
protected string $query

Query string

Query string

# ''
protected array $headers
# []

Properties inherited from Basho\Riak\Api

$command, $config, $error, $node, $request, $response, $success

Official Riak Client for PHP API documentation generated by ApiGen