__construct()
__destruct()
__get()
__isset()
__set()
__unset()
clear()
count()
fromArray()
getIterator()
getMetadata()
getRequestAccessTime()
init()
isImmutable()
isLocked()
lock()
markImmutable()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
serialize()
setMetadata()
toArray()
unlock()
unserialize()
setRequestAccessTime()
Session storage in $_SESSION
Replaces the $_SESSION superglobal with an ArrayObject that allows for property access, metadata storage, locking, and immutability.
__construct(array | null $input)
arraynull
__destruct() : void
__get(mixed $key) : mixed
mixed
mixed
__isset(mixed $key) : bool
mixed
bool
__set(mixed $key, mixed $value) : void
mixed
mixed
__unset(mixed $key) : void
mixed
clear(null | int | string $key) : \Zend\Session\Storage\ArrayStorage
count() : int
int
fromArray(array $array) : \Zend\Session\Storage\SessionStorage
Ensures $_SESSION is set to an instance of the object when complete.
array
getMetadata(null | int | string $key) : mixed
Returns false if no metadata stored, or no metadata exists for the given key.
nullintstring
mixed
getRequestAccessTime() : float
float
init(array $input) : void
array
isImmutable() : bool
bool
isLocked(null | int | string $key) : bool
nullintstring
bool
lock(null | int | string $key) : \Zend\Session\Storage\ArrayStorage
markImmutable() : \Zend\Session\Storage\SessionStorage
offsetExists(mixed $key) : bool
mixed
bool
offsetGet(mixed $key) : mixed
mixed
mixed
offsetSet(mixed $key, mixed $value) : void
mixed
mixed
offsetUnset(mixed $key) : void
mixed
serialize() : string
string
setMetadata(string $key, mixed $value, bool $overwriteArray) : \Zend\Session\Storage\ArrayStorage
Metadata is used to store information about the data being stored in the object. Some example use cases include: - Setting expiry data - Maintaining access counts - localizing session storage - etc.
string
mixed
bool
Whether to overwrite or merge array values; by default, merges
\Zend\Session\Exception\RuntimeException |
---|
toArray(bool $metaData) : array
bool
Whether to include metadata
array
unlock(null | int | string $key) : \Zend\Session\Storage\ArrayStorage
unserialize(string $session) : mixed
string
mixed