CouchbaseCollectionAdapter
extends AbstractAdapter
in package
Tags
Table of Contents
Constants
- MAX_KEY_LENGTH = 250
Properties
- $connection : Collection
- $marshaller : MarshallerInterface
Methods
- __construct() : mixed
- commit() : bool
- Persists any deferred cache items.
- createConnection() : Bucket|Collection
- createSystemCache() : AdapterInterface
- Returns the best possible adapter that your runtime supports.
- isSupported() : bool
- doClear() : bool
- doDelete() : bool
- doFetch() : array<string|int, mixed>
- doHave() : bool
- doSave() : array<string|int, mixed>|bool
- getOptions() : array<string|int, mixed>
Constants
MAX_KEY_LENGTH
private
mixed
MAX_KEY_LENGTH
= 250
Properties
$connection
private
Collection
$connection
$marshaller
private
MarshallerInterface
$marshaller
Methods
__construct()
public
__construct(Collection $connection[, string $namespace = '' ][, int $defaultLifetime = 0 ][, MarshallerInterface|null $marshaller = null ]) : mixed
Parameters
- $connection : Collection
- $namespace : string = ''
- $defaultLifetime : int = 0
- $marshaller : MarshallerInterface|null = null
commit()
Persists any deferred cache items.
public
commit() : bool
Return values
bool —True if all not-yet-saved items were successfully saved or there were none. False otherwise.
createConnection()
public
static createConnection(array<string|int, mixed>|string $dsn[, array<string|int, mixed> $options = [] ]) : Bucket|Collection
Parameters
- $dsn : array<string|int, mixed>|string
- $options : array<string|int, mixed> = []
Return values
Bucket|CollectioncreateSystemCache()
Returns the best possible adapter that your runtime supports.
public
static createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory[, LoggerInterface|null $logger = null ]) : AdapterInterface
Using ApcuAdapter makes system caches compatible with read-only filesystems.
Parameters
- $namespace : string
- $defaultLifetime : int
- $version : string
- $directory : string
- $logger : LoggerInterface|null = null
Return values
AdapterInterfaceisSupported()
public
static isSupported() : bool
Return values
booldoClear()
protected
doClear(mixed $namespace) : bool
Parameters
- $namespace : mixed
Return values
booldoDelete()
protected
doDelete(array<string|int, mixed> $ids) : bool
Parameters
- $ids : array<string|int, mixed>
Return values
booldoFetch()
protected
doFetch(array<string|int, mixed> $ids) : array<string|int, mixed>
Parameters
- $ids : array<string|int, mixed>
Return values
array<string|int, mixed>doHave()
protected
doHave(mixed $id) : bool
Parameters
- $id : mixed
Return values
booldoSave()
protected
doSave(array<string|int, mixed> $values, mixed $lifetime) : array<string|int, mixed>|bool
Parameters
- $values : array<string|int, mixed>
- $lifetime : mixed
Return values
array<string|int, mixed>|boolgetOptions()
private
static getOptions(string $options) : array<string|int, mixed>
Parameters
- $options : string