| fastlzCompress() |
Compress input using FastLZ algorithm. |
|
| fastlzDecompress() |
Decompress input using FastLZ algorithm. |
|
| zlibCompress() |
Compress input using zlib. Raises Exception when extension compiled without zlib support. |
|
| zlibDecompress() |
Compress input using zlib. Raises Exception when extension compiled without zlib support. |
|
| passthruDecoder() |
Returns value as it received from the server without any transformations. |
|
| passthruEncoder() |
Returns the value, which has been passed and zero as flags and datatype. |
|
| defaultDecoder() |
Decodes value using \Couchbase\basicDecoderV1. |
|
| defaultEncoder() |
Encodes value using \Couchbase\basicDecoderV1. |
|
| basicDecoderV1() |
Decodes value according to Common Flags (RFC-20) |
|
| basicEncoderV1() |
Encodes value according to Common Flags (RFC-20) |
|
fastlzCompress()
Compress input using FastLZ algorithm.
fastlzCompress(
$data :
string
)
: string
Parameters
-
$data
: string
Return values
string
— compressed binary string
fastlzDecompress()
Decompress input using FastLZ algorithm.
fastlzDecompress(
$data :
string
)
: string
Parameters
-
$data
: string
Return values
string
— original data
zlibCompress()
Compress input using zlib. Raises Exception when extension compiled without zlib support.
zlibCompress(
$data :
string
)
: string
Parameters
-
$data
: string
Tags
-
see
Return values
string
— compressed binary string
zlibDecompress()
Compress input using zlib. Raises Exception when extension compiled without zlib support.
zlibDecompress(
$data :
string
)
: string
Parameters
-
$data
: string
Tags
-
see
Return values
string
— original data
passthruDecoder()
Returns value as it received from the server without any transformations.
passthruDecoder(
$bytes :
string
, $flags :
int
, $datatype :
int
)
: string
It is useful for debug purpose to inspect bare value.
Parameters
-
$bytes
: string
-
$flags
: int
-
$datatype
: int
Tags
-
example
examples/api/couchbase.passthruDecoder.php
-
see
Return values
string
— Document as it received from the Couchbase.
passthruEncoder()
Returns the value, which has been passed and zero as flags and datatype.
passthruEncoder(
$value :
string
)
: array
It is useful for debug purposes, or when the value known to be a string, otherwise behavior is not defined (most
likely it will generate error).
Parameters
-
$value
: string
document to be stored in the Couchbase
Tags
-
see
Return values
array
— Array with three values: [bytes, 0, 0]
defaultDecoder()
Decodes value using \Couchbase\basicDecoderV1.
defaultDecoder(
$bytes :
string
, $flags :
int
, $datatype :
int
)
: mixed
It passes couchbase.decoder.* INI properties as $options.
Parameters
-
$bytes
: string
Binary string received from the Couchbase, which contains encoded document
-
$flags
: int
Flags which describes document encoding
-
$datatype
: int
Extra field for datatype (not used at the moment)
Tags
-
see
-
see
Return values
mixed
— Decoded document object
defaultEncoder()
Encodes value using \Couchbase\basicDecoderV1.
defaultEncoder(
$value :
mixed
)
: array
It passes couchbase.encoder.* INI properties as $options.
Parameters
-
$value
: mixed
document to be stored in the Couchbase
Tags
-
see
-
see
Return values
array
— Array with three values: [bytes, flags, datatype]
basicDecoderV1()
Decodes value according to Common Flags (RFC-20)
basicDecoderV1(
$bytes :
string
, $flags :
int
, $datatype :
int
, $options :
array
)
: mixed
Parameters
-
$bytes
: string
Binary string received from the Couchbase, which contains encoded document
-
$flags
: int
Flags which describes document encoding
-
$datatype
: int
Extra field for datatype (not used at the moment)
-
$options
: array
Tags
-
see
RFC-20 at SDK RFCs repository
Return values
mixed
— Decoded document object
basicEncoderV1()
Encodes value according to Common Flags (RFC-20)
basicEncoderV1(
$value :
mixed
, $options :
array
)
: array
Parameters
-
$value
: mixed
document to be stored in the Couchbase
-
$options
: array
Encoder options (see detailed description in INI section)
- "sertype" (default: \Couchbase::ENCODER_FORMAT_JSON) encoding format to use
- "cmprtype" (default: \Couchbase::ENCODER_COMPRESSION_NONE) compression type
- "cmprthresh" (default: 0) compression threshold
- "cmprfactor" (default: 0) compression factor
Tags
-
see
RFC-20 at SDK RFCs repository
Return values
array
— Array with three values: [bytes, flags, datatype]