1833. Class

1833.1. Zend\Session\Storage\SessionArrayStorage

Session storage in $_SESSION

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

1833.1.1. Methods

1833.1.1.1. __construct

__construct()

Constructor

Parameters:
  • array|null
  • int
  • string

1833.1.1.2. __get

__get()

Get Offset

Parameters:mixed
Return type:mixed

1833.1.1.3. __set

__set()

Set Offset

Parameters:
  • mixed
  • mixed
Return type:

void

1833.1.1.4. __isset

__isset()

Isset Offset

Parameters:mixed
Return type:boolean

1833.1.1.5. __unset

__unset()

Unset Offset

Parameters:mixed
Return type:void

1833.1.1.6. __destruct

__destruct()

Destructor

Return type:void

1833.1.1.7. offsetExists

offsetExists()

Offset Exists

Parameters:mixed
Return type:boolean

1833.1.1.8. offsetGet

offsetGet()

Offset Get

Parameters:mixed
Return type:mixed

1833.1.1.9. offsetSet

offsetSet()

Offset Set

Parameters:
  • mixed
  • mixed
Return type:

void

1833.1.1.10. offsetUnset

offsetUnset()

Offset Unset

Parameters:mixed
Return type:void

1833.1.1.11. count

count()

Count

Return type:int

1833.1.1.12. serialize

serialize()

Seralize

Return type:string

1833.1.1.13. unserialize

unserialize()

Unserialize

Return type:mixed

1833.1.1.14. getIterator

getIterator()

Get Iterator

Return type:ArrayIterator

1833.1.1.15. fromArray

fromArray()

Load session object from an existing array

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

Parameters:array
Return type:SessionStorage

1833.1.1.16. markImmutable

markImmutable()

Mark object as isImmutable

Return type:SessionStorage

1833.1.1.17. isImmutable

isImmutable()

Determine if this object is isImmutable

Return type:bool

1833.1.1.18. lock

lock()

Lock this storage instance, or a key within it

Parameters:null|int|string
Return type:ArrayStorage

1833.1.1.19. isLocked

isLocked()

Is the object or key marked as locked?

Parameters:null|int|string
Return type:bool

1833.1.1.20. unlock

unlock()

Unlock an object or key marked as locked

Parameters:null|int|string
Return type:ArrayStorage

1833.1.1.21. setMetadata

setMetadata()

Set storage metadata

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.

Parameters:
  • string
  • mixed
  • bool – Whether to overwrite or merge array values; by default, merges
Return type:

ArrayStorage

Throws :

ExceptionRuntimeException

1833.1.1.22. getMetadata

getMetadata()

Retrieve metadata for the storage object or a specific metadata key

Returns false if no metadata stored, or no metadata exists for the given key.

Parameters:null|int|string
Return type:mixed

1833.1.1.23. clear

clear()

Clear the storage object or a subkey of the object

Parameters:null|int|string
Return type:ArrayStorage
Throws :ExceptionRuntimeException

1833.1.1.24. getRequestAccessTime

getRequestAccessTime()

Retrieve the request access time

Return type:float

1833.1.1.25. setRequestAccessTime

setRequestAccessTime()

Set the request access time

Parameters:float
Return type:ArrayStorage

1833.1.1.26. toArray

toArray()

Cast the object to an array

Returns data only, no metadata.

Return type:array