Replaces the $_SESSION superglobal with an ArrayObject that allows for
property access, metadata storage, locking, and immutability.
Methods
Constructor
__construct(array | null $input, int $flags, string $iteratorClass)
Sets the $_SESSION superglobal to an ArrayObject, maintaining previous
values if any discovered.
Parameters
$input
arraynull
$flags
int
$iteratorClass
string
Destructor
__destruct() : void
Resets $_SESSION superglobal to an array, by casting object using
getArrayCopy().
Returns the value at the specified key by reference
__get(mixed $key) : mixed
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::__get() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::__get() |
Parameters
$key
mixed
Returns
mixed
Returns whether the requested key exists
__isset(mixed $key) : bool
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::__isset() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::__isset() |
Parameters
$key
mixed
Returns
bool
Sets the value at the specified key to value
__set(mixed $key, mixed $value) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::__set() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::__set() |
Parameters
$key
mixed
$value
mixed
Unsets the value at the specified key
__unset(mixed $key) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::__unset() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::__unset() |
Parameters
$key
mixed
Appends the value
append(mixed $value) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::append() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::append() |
Parameters
$value
mixed
Sort the entries by value
asort() : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::asort() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::asort() |
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\ArrayStorage::clear() |
Parameters
$key
nullintstring
Exceptions
Returns
Get the number of public properties in the ArrayObject
count() : int
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::count() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::count() |
Returns
int
Exchange the array for another one.
exchangeArray(array | \Zend\Stdlib\ArrayObject $data) : array
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::exchangeArray() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::exchangeArray() |
Parameters
Returns
array
Load session object from an existing array
fromArray(array $array) : \Zend\Session\Storage\SessionStorage
Ensures $_SESSION is set to an instance of the object when complete.
Parameters
$array
array
Returns
Creates a copy of the ArrayObject.
getArrayCopy() : array
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::getArrayCopy() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::getArrayCopy() |
Returns
array
Gets the behavior flags.
getFlags() : int
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::getFlags() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::getFlags() |
Returns
int
Create a new iterator from an ArrayObject instance
getIterator() : \Iterator
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::getIterator() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::getIterator() |
Returns
\Iterator
Gets the iterator classname for the ArrayObject.
getIteratorClass() : string
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::getIteratorClass() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::getIteratorClass() |
Returns
string
Retrieve the request access time
getRequestAccessTime() : float
Inherited
inherited_from |
\Zend\Session\Storage\ArrayStorage::getRequestAccessTime() |
Returns
float
Determine if this object is isImmutable
isImmutable() : bool
Is the object or key marked as locked?
isLocked(null | int | string $key) : bool
Inherited
inherited_from |
\Zend\Session\Storage\ArrayStorage::isLocked() |
Parameters
$key
nullintstring
Returns
bool
Sort the entries by key
ksort() : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::ksort() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::ksort() |
Lock this storage instance, or a key within it
lock(null | int | string $key) : \Zend\Session\Storage\ArrayStorage
Inherited
inherited_from |
\Zend\Session\Storage\ArrayStorage::lock() |
Parameters
$key
nullintstring
Returns
Sort an array using a case insensitive "natural order" algorithm
natcasesort() : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::natcasesort() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::natcasesort() |
Sort entries using a "natural order" algorithm
natsort() : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::natsort() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::natsort() |
Returns whether the requested key exists
offsetExists(mixed $key) : bool
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::offsetExists() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::offsetExists() |
Parameters
$key
mixed
Returns
bool
Returns the value at the specified key
offsetGet(mixed $key) : mixed
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::offsetGet() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::offsetGet() |
Parameters
$key
mixed
Returns
mixed
Sets the value at the specified key to value
offsetSet(mixed $key, mixed $value) : void
Inherited
inherited_from |
\Zend\Session\Storage\ArrayStorage::offsetSet() |
Parameters
$key
mixed
$value
mixed
Exceptions
Unsets the value at the specified key
offsetUnset(mixed $key) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::offsetUnset() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::offsetUnset() |
Parameters
$key
mixed
Serialize an ArrayObject
serialize() : string
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::serialize() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::serialize() |
Returns
string
Sets the behavior flags
setFlags(int $flags) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::setFlags() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::setFlags() |
Parameters
$flags
int
Sets the iterator classname for the ArrayObject
setIteratorClass(string $class) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::setIteratorClass() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::setIteratorClass() |
Parameters
$class
string
Cast the object to an array
toArray(bool $metaData) : array
Inherited
inherited_from |
\Zend\Session\Storage\ArrayStorage::toArray() |
Parameters
$metaData
bool
Whether to include metadata
Returns
array
Sort the entries with a user-defined comparison function and maintain key association
uasort(\Zend\Stdlib\callable $function) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::uasort() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::uasort() |
Parameters
$function
\Zend\Stdlib\callable
Sort the entries by keys using a user-defined comparison function
uksort(\Zend\Stdlib\callable $function) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::uksort() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::uksort() |
Parameters
$function
\Zend\Stdlib\callable
Unlock an object or key marked as locked
unlock(null | int | string $key) : \Zend\Session\Storage\ArrayStorage
Inherited
inherited_from |
\Zend\Session\Storage\ArrayStorage::unlock() |
Parameters
$key
nullintstring
Returns
Unserialize an ArrayObject
unserialize(string $data) : void
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::unserialize() |
inherited_from |
\Zend\Session\Storage\ArrayStorage::unserialize() |
Parameters
$data
string
Set the request access time
setRequestAccessTime(float $time) : \Zend\Session\Storage\ArrayStorage
Inherited
inherited_from |
\Zend\Session\Storage\ArrayStorage::setRequestAccessTime() |
Parameters
$time
float
Returns
Properties
$flag
$flag : int
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::$$flag |
inherited_from |
\Zend\Session\Storage\ArrayStorage::$$flag |
Is storage marked isImmutable?
$isImmutable : bool
Inherited
inherited_from |
\Zend\Session\Storage\ArrayStorage::$$isImmutable |
$iteratorClass
$iteratorClass : string
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::$$iteratorClass |
inherited_from |
\Zend\Session\Storage\ArrayStorage::$$iteratorClass |
$protectedProperties
$protectedProperties : array
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::$$protectedProperties |
inherited_from |
\Zend\Session\Storage\ArrayStorage::$$protectedProperties |
$storage
$storage : array
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::$$storage |
inherited_from |
\Zend\Session\Storage\ArrayStorage::$$storage |
Constants
Entries can be accessed as properties (read and write).
ARRAY_AS_PROPS
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::ARRAY_AS_PROPS |
inherited_from |
\Zend\Session\Storage\ArrayStorage::ARRAY_AS_PROPS |
Properties of the object have their normal functionality
when accessed as list (var_dump, foreach, etc.).
STD_PROP_LIST
Inherited
inherited_from |
\Zend\Stdlib\ArrayObject::STD_PROP_LIST |
inherited_from |
\Zend\Session\Storage\ArrayStorage::STD_PROP_LIST |