Unless otherwise marked, all options in this class affect all adapters.

 Methods

Constructor

__construct(array | \Traversable | null $options) 
Inherited

inherited_from \Zend\Stdlib\AbstractOptions::__construct()

Parameters

$options

array\Traversablenull

Get a configuration property

__get(string $key) : mixed
Inherited

see \Zend\Stdlib\ParameterObject::__get()
inherited_from \Zend\Stdlib\AbstractOptions::__get()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Returns

mixed

Test if a configuration property is null

__isset(string $key) : bool
Inherited

see \Zend\Stdlib\ParameterObject::__isset()
inherited_from \Zend\Stdlib\AbstractOptions::__isset()

Parameters

$key

string

Returns

bool

Set a configuration property

__set(string $key, mixed $value) : void
Inherited

see \Zend\Stdlib\ParameterObject::__set()
inherited_from \Zend\Stdlib\AbstractOptions::__set()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Set a configuration property to NULL

__unset(string $key) : void
Inherited

see \Zend\Stdlib\ParameterObject::__unset()
inherited_from \Zend\Stdlib\AbstractOptions::__unset()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Get key pattern

getKeyPattern() : string

Returns

string

Get namespace

getNamespace() : string

Returns

string

If reading data from cache enabled.

getReadable() : bool

Returns

bool

Get time to live.

getTtl() : float

Returns

float

If writing data to cache enabled.

getWritable() : bool

Returns

bool

Adapter using this instance

setAdapter(\Zend\Cache\Storage\StorageInterface $adapter) : \Zend\Cache\Storage\Adapter\AdapterOptions

Set one or more configuration properties

setFromArray(array | \Traversable | \Zend\Stdlib\AbstractOptions $options) : \Zend\Stdlib\AbstractOptions
Inherited

inherited_from \Zend\Stdlib\AbstractOptions::setFromArray()

Parameters

$options

array\Traversable\Zend\Stdlib\AbstractOptions

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Returns

\Zend\Stdlib\AbstractOptionsProvides fluent interface

Set key pattern

setKeyPattern(null | string $keyPattern) : \Zend\Cache\Storage\Adapter\AdapterOptions

Set namespace.

setNamespace(string $namespace) : \Zend\Cache\Storage\Adapter\AdapterOptions

Parameters

$namespace

string

Returns

Enable/Disable reading data from cache.

setReadable(bool $readable) : \Zend\Cache\Storage\Adapter\AbstractAdapter

Parameters

$readable

bool

Returns

Set time to live.

setTtl(int | float $ttl) : \Zend\Cache\Storage\Adapter\AdapterOptions

Parameters

$ttl

intfloat

Returns

Enable/Disable writing data to cache.

setWritable(bool $writable) : \Zend\Cache\Storage\Adapter\AdapterOptions

Parameters

$writable

bool

Returns

Cast to array

toArray() : array
Inherited

inherited_from \Zend\Stdlib\AbstractOptions::toArray()

Returns

array

Validates and normalize a TTL.

normalizeTtl(int | float $ttl) : void

Parameters

$ttl

intfloat

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Triggers an option event if this options instance has a connection to an adapter implements EventsCapableInterface.

triggerOptionEvent(string $optionName, mixed $optionValue) : void

Parameters

$optionName

string

$optionValue

mixed

 Properties

 

We use the __ prefix to avoid collisions with properties in user-implementations.

$__strictMode__ : bool
Inherited

inherited_from \Zend\Stdlib\AbstractOptions::$$__strictMode__
 

The adapter using these options

$adapter : null | \Zend\Cache\Storage\Adapter\Filesystem

 

Validate key against pattern

$keyPattern : string

 

Namespace option

$namespace : string

 

Readable option

$readable : bool

 

TTL option

$ttl : int | float

 

Writable option

$writable : bool