Documentation

RdbObjectDriver

Base interface for object drivers.

These implement different methods for serialising object data.

Table of Contents

Methods

getObject()  : T|null
Get an object from a key.
inspect()  : string|null
Inspect the object stored in the key.
mGetObjects()  : array<string, T|null>
Get multiple objects from a key.
mSetObjects()  : array<string|int, int>
Set multiple objects.
setObject()  : int
Set an object.

Methods

getObject()

Get an object from a key.

public getObject(string $key, T> $expected) : T|null
Parameters
$key : string
$expected : T>
Tags
template
Return values
T|null

inspect()

Inspect the object stored in the key.

public inspect(string $key) : string|null
Parameters
$key : string
Return values
string|null —

the object class name

mGetObjects()

Get multiple objects from a key.

public mGetObjects(array<string|int, string> $keys, T> $expected) : array<string, T|null>
Parameters
$keys : array<string|int, string>
$expected : T>
Tags
template
Return values
array<string, T|null>

mSetObjects()

Set multiple objects.

public mSetObjects(iterable<string|int, mixed> $items) : array<string|int, int>
Parameters
$items : iterable<string|int, mixed>

[ key => object ]

Return values
array<string|int, int> —

[ key => int ] object sizes in bytes

setObject()

Set an object.

public setObject(string $key, object $value[, int|float $ttl = 0 ]) : int
Parameters
$key : string
$value : object
$ttl : int|float = 0

seconds

Return values
int —

object size in bytes

On this page

Search results