PHP Class Aerospike\Bytes

This ensures that the string will not get truncated or otherwise lose data. The main difference is that strings in the Aerospike cluster can have a secondary index built over them, and queries executed against the index, while bytes data cannot.
Author: Ronen Botzer ([email protected])
Inheritance: implements Serializable
Show file Open project: aerospike/aerospike-client-php

Public Properties

Property Type Description
$s string The container for the binary-string

Public Methods

Method Description
__construct ( string $bin_str ) Constructor for \Aerospike\Bytes class.
__toString ( ) : string Returns the binary-string held in the \Aerospike\Bytes object.
serialize ( ) : string Returns a serialized representation of the binary-string.
unserialize ( string $bin_str ) Re-wraps the binary-string when called by unserialize().
unwrap ( Bytes $bytes_wrap ) : string Unwraps an \Aerospike\Bytes object, returning the binary-string inside.

Method Details

__construct() public method

Constructor for \Aerospike\Bytes class.
public __construct ( string $bin_str )
$bin_str string a PHP binary-string such as gzdeflate() produces.

__toString() public method

Returns the binary-string held in the \Aerospike\Bytes object.
public __toString ( ) : string
return string

serialize() public method

Called by serialize()
public serialize ( ) : string
return string

unserialize() public method

Re-wraps the binary-string when called by unserialize().
public unserialize ( string $bin_str )
$bin_str string a PHP binary-string. Called by unserialize().

unwrap() public static method

Unwraps an \Aerospike\Bytes object, returning the binary-string inside.
public static unwrap ( Bytes $bytes_wrap ) : string
$bytes_wrap Bytes
return string

Property Details

$s public property

The container for the binary-string
public string $s
return string