PHP Class Basho\Riak\Object

Author: Riak team (https://github.com/basho/riak-php-client/contributors)
Datei anzeigen Open project: basho/riak-php-client Class Usage Examples

Protected Properties

Property Type Description
$charset
$content_encoding
$content_type
$data mixed | null Stored data or object
$indexes
$metadata
$raw_data mixed | null Stores raw non-decoded response data
$vclock

Public Methods

Method Description
__construct ( mixed | null $data = null, array | null $headers = [] )
addValueToIndex ( $indexName, $value )
getCharset ( ) : string
getContentEncoding ( ) : string
getContentType ( )
getData ( )
getIndex ( $indexName )
getIndexes ( )
getMetaData ( )
getMetaDataValue ( $key )
getRawData ( ) : mixed | null Getter for raw non-decoded response data [HTTP ONLY]
getVclock ( )
removeMetaDataValue ( $key )
removeValueFromIndex ( $indexName, $value )
setCharset ( string $charset )
setContentEncoding ( string $content_encoding ) Used to identify the encoding of the object data
setContentType ( string $content_type ) Used to identify the mime-type of the object data
setData ( $data )
setMetaDataValue ( $key, $value = '' )
setRawData ( mixed | null $raw_data )
setVclock ( string $vclock )

Private Methods

Method Description
validateIndexNameAndValue ( $indexName, $value )

Method Details

__construct() public method

public __construct ( mixed | null $data = null, array | null $headers = [] )
$data mixed | null
$headers array | null DEPRECATED

addValueToIndex() public method

public addValueToIndex ( $indexName, $value )

getCharset() public method

public getCharset ( ) : string
return string

getContentEncoding() public method

public getContentEncoding ( ) : string
return string

getContentType() public method

public getContentType ( )

getData() public method

public getData ( )

getIndex() public method

public getIndex ( $indexName )

getIndexes() public method

public getIndexes ( )

getMetaData() public method

public getMetaData ( )

getMetaDataValue() public method

public getMetaDataValue ( $key )

getRawData() public method

Getter for raw non-decoded response data [HTTP ONLY]
public getRawData ( ) : mixed | null
return mixed | null

getVclock() public method

public getVclock ( )

removeMetaDataValue() public method

public removeMetaDataValue ( $key )

removeValueFromIndex() public method

public removeValueFromIndex ( $indexName, $value )

setCharset() public method

public setCharset ( string $charset )
$charset string

setContentEncoding() public method

If set to base64, object data will be automatically encoded to base64 upon transfer to Riak. If set to binary or none, object data will NOT be rawurlencoded upon transfer to Riak.
public setContentEncoding ( string $content_encoding )
$content_encoding string

setContentType() public method

If set to application/json or text/json the object data will automatically be json_encoded upon transfer to Riak.
public setContentType ( string $content_type )
$content_type string

setData() public method

public setData ( $data )

setMetaDataValue() public method

public setMetaDataValue ( $key, $value = '' )

setRawData() public method

public setRawData ( mixed | null $raw_data )
$raw_data mixed | null

setVclock() public method

public setVclock ( string $vclock )
$vclock string

Property Details

$charset protected_oe property

protected $charset

$content_encoding protected_oe property

protected $content_encoding

$content_type protected_oe property

protected $content_type

$data protected_oe property

Stored data or object
protected mixed|null $data
return mixed | null

$indexes protected_oe property

protected $indexes

$metadata protected_oe property

protected $metadata

$raw_data protected_oe property

Stores raw non-decoded response data
protected mixed|null $raw_data
return mixed | null

$vclock protected_oe property

protected $vclock