PHP 5.3.4 and greater variant of SessionArrayStorage

Replaces the $_SESSION superglobal with an ArrayObject that allows for property access, metadata storage, locking, and immutability.

 Methods

Constructor

__construct(array | null $input) 
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::__construct()

Parameters

$input

arraynull

Destructor

__destruct() : void
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::__destruct()

Get Offset

__get(mixed $key) : mixed

Parameters

$key

mixed

Returns

mixed

Isset Offset

__isset(mixed $key) : boolean
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::__isset()

Parameters

$key

mixed

Returns

boolean

Set Offset

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

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::__set()

Parameters

$key

mixed

$value

mixed

Unset Offset

__unset(mixed $key) : void
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::__unset()

Parameters

$key

mixed

Clear the storage object or a subkey of the object

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

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::clear()

Parameters

$key

nullintstring

Exceptions

\Zend\Session\Exception\RuntimeException

Returns

Count

count() : int
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::count()

Returns

int

Load session object from an existing array

fromArray(array $array) : \Zend\Session\Storage\SessionStorage
Inherited

Ensures $_SESSION is set to an instance of the object when complete.

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::fromArray()

Parameters

$array

array

Returns

Get Iterator

getIterator() : \ArrayIterator
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::getIterator()

Returns

Retrieve the request access time

getRequestAccessTime() : float
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::getRequestAccessTime()

Returns

float

Initialize Storage

init(array $input) : void
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::init()

Parameters

$input

array

Determine if this object is isImmutable

isImmutable() : bool
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::isImmutable()

Returns

bool

Is the object or key marked as locked?

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

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::isLocked()

Parameters

$key

nullintstring

Returns

bool

Lock this storage instance, or a key within it

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

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::lock()

Parameters

$key

nullintstring

Returns

Mark object as isImmutable

markImmutable() : \Zend\Session\Storage\SessionStorage
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::markImmutable()

Returns

Offset Exists

offsetExists(mixed $key) : boolean
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::offsetExists()

Parameters

$key

mixed

Returns

boolean

Offset Get

offsetGet(mixed $key) : mixed

Parameters

$key

mixed

Returns

mixed

Offset Set

offsetSet(mixed $key, mixed $value) : void
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::offsetSet()

Parameters

$key

mixed

$value

mixed

Offset Unset

offsetUnset(mixed $key) : void
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::offsetUnset()

Parameters

$key

mixed

Seralize

serialize() : string
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::serialize()

Returns

string

Cast the object to an array

toArray(bool $metaData) : array
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::toArray()

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
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::unlock()

Parameters

$key

nullintstring

Returns

Unserialize

unserialize(string $session) : mixed
Inherited

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::unserialize()

Parameters

$session

string

Returns

mixed

Set the request access time

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

inherited_from \Zend\Session\Storage\AbstractSessionArrayStorage::setRequestAccessTime()

Parameters

$time

float

Returns