CouchbaseBucketAdapter
extends AbstractAdapter
in package
Tags
Table of Contents
- KEY_NOT_FOUND = 13
- MAX_KEY_LENGTH = 250
- THIRTY_DAYS_IN_SECONDS = 2592000
- VALID_DSN_OPTIONS = ['operationTimeout', 'configTimeout', 'configNodeTimeout', 'n1qlTimeout', 'httpTimeout', 'configDelay', 'htconfigIdleTimeout', 'durabilityInterval', 'durabilityTimeout']
- $apcuSupported : mixed
- $bucket : mixed
- $marshaller : mixed
- $phpFilesSupported : mixed
- __construct() : mixed
- commit() : bool
- {@inheritdoc}
- createConnection() : CouchbaseBucket
- createSystemCache() : AdapterInterface
- Returns the best possible adapter that your runtime supports.
- isSupported() : bool
- doClear() : bool
- {@inheritdoc}
- doDelete() : bool
- {@inheritdoc}
- doFetch() : mixed
- {@inheritdoc}
- doHave() : bool
- {@inheritdoc}
- doSave() : mixed
- {@inheritdoc}
- getOptions() : array<string|int, mixed>
- initOptions() : array<string|int, mixed>
- normalizeExpiry() : int
Constants
KEY_NOT_FOUND
private
mixed
KEY_NOT_FOUND
= 13
MAX_KEY_LENGTH
private
mixed
MAX_KEY_LENGTH
= 250
THIRTY_DAYS_IN_SECONDS
private
mixed
THIRTY_DAYS_IN_SECONDS
= 2592000
VALID_DSN_OPTIONS
private
mixed
VALID_DSN_OPTIONS
= ['operationTimeout', 'configTimeout', 'configNodeTimeout', 'n1qlTimeout', 'httpTimeout', 'configDelay', 'htconfigIdleTimeout', 'durabilityInterval', 'durabilityTimeout']
Properties
$apcuSupported
private
static mixed
$apcuSupported
$bucket
private
mixed
$bucket
$marshaller
private
mixed
$marshaller
$phpFilesSupported
private
static mixed
$phpFilesSupported
Methods
__construct()
public
__construct(CouchbaseBucket $bucket[, string $namespace = '' ], int $defaultLifetime[, MarshallerInterface|null $marshaller = null ]) : mixed
Parameters
- $bucket : CouchbaseBucket
- $namespace : string = ''
- $defaultLifetime : int
- $marshaller : MarshallerInterface|null = null
Return values
mixed —commit()
{@inheritdoc}
public
commit() : bool
Return values
bool —createConnection()
public
static createConnection(array<string|int, mixed>|string $servers[, array<string|int, mixed> $options = [] ]) : CouchbaseBucket
Parameters
- $servers : array<string|int, mixed>|string
- $options : array<string|int, mixed> = []
Return values
CouchbaseBucket —createSystemCache()
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
AdapterInterface —isSupported()
public
static isSupported() : bool
Return values
bool —doClear()
{@inheritdoc}
protected
doClear(string $namespace) : bool
Parameters
- $namespace : string
Return values
bool —doDelete()
{@inheritdoc}
protected
doDelete(array<string|int, mixed> $ids) : bool
Parameters
- $ids : array<string|int, mixed>
Return values
bool —doFetch()
{@inheritdoc}
protected
doFetch(array<string|int, mixed> $ids) : mixed
Parameters
- $ids : array<string|int, mixed>
Return values
mixed —doHave()
{@inheritdoc}
protected
doHave(string $id) : bool
Parameters
- $id : string
Return values
bool —doSave()
{@inheritdoc}
protected
doSave(array<string|int, mixed> $values, int $lifetime) : mixed
Parameters
- $values : array<string|int, mixed>
- $lifetime : int
Return values
mixed —getOptions()
private
static getOptions(string $options) : array<string|int, mixed>
Parameters
- $options : string
Return values
array<string|int, mixed> —initOptions()
private
static initOptions(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
Return values
array<string|int, mixed> —normalizeExpiry()
private
normalizeExpiry(int $expiry) : int
Parameters
- $expiry : int