Array session storage

Defines an ArrayObject interface for accessing session storage, with options for setting metadata, locking, and marking as isImmutable.

 Methods

Constructor

__construct(array $input, int $flags, string $iteratorClass) 

Instantiates storage as an ArrayObject, allowing property access. Also sets the initial request access time.

Parameters

$input

array

$flags

int

$iteratorClass

string

Clear the storage object or a subkey of the object

clear(null | int | string $key) : \Zend\Session\Storage\ArrayStorage

Parameters

$key

nullintstring

Exceptions

\Zend\Session\Exception\RuntimeException

Returns

Load the storage from another array

fromArray(array $array) : \Zend\Session\Storage\ArrayStorage

Overwrites any data that was previously set.

Parameters

$array

array

Returns

Retrieve the request access time

getRequestAccessTime() : float

Returns

float

Is the storage container marked as isImmutable?

isImmutable() : bool

Returns

bool

Is the object or key marked as locked?

isLocked(null | int | string $key) : bool

Parameters

$key

nullintstring

Returns

bool

Lock this storage instance, or a key within it

lock(null | int | string $key) : \Zend\Session\Storage\ArrayStorage

Parameters

$key

nullintstring

Returns

Mark the storage container as isImmutable

markImmutable() : \Zend\Session\Storage\ArrayStorage

offsetSet()

offsetSet(mixed $key, mixed $value) 

Parameters

$key

mixed

$value

mixed

Exceptions

\Zend\Session\Exception\RuntimeException

Cast the object to an array

toArray(bool $metaData) : array

Parameters

$metaData

bool

Whether to include metadata

Returns

array

Unlock an object or key marked as locked

unlock(null | int | string $key) : \Zend\Session\Storage\ArrayStorage

Parameters

$key

nullintstring

Returns

Set the request access time

setRequestAccessTime(float $time) : \Zend\Session\Storage\ArrayStorage

Parameters

$time

float

Returns

 Properties

 

Is storage marked isImmutable?

$isImmutable : bool