Fully Qualified Name: | Laminas\Session\Storage\ArrayStorage |
Extends: | ArrayObject |
Implements: | StorageInterface |
Array session storage
Defines an ArrayObject interface for accessing session storage, with options for setting metadata, locking, and marking as isImmutable.
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | ArrayStorage |
__get() | Returns the value at the specified key by reference | ArrayObject |
__isset() | Returns whether the requested key exists | ArrayObject |
__set() | Sets the value at the specified key to value | ArrayObject |
__unset() | Unsets the value at the specified key | ArrayObject |
append() | Appends the value | ArrayObject |
asort() | Sort the entries by value | ArrayObject |
clear() | Clear the storage object or a subkey of the object | ArrayStorage |
count() | Get the number of public properties in the ArrayObject | ArrayObject |
exchangeArray() | Exchange the array for another one. | ArrayObject |
fromArray() | Load the storage from another array | ArrayStorage |
getArrayCopy() | Creates a copy of the ArrayObject. | ArrayObject |
getFlags() | Gets the behavior flags. | ArrayObject |
getIterator() | Create a new iterator from an ArrayObject instance | ArrayObject |
getIteratorClass() | Gets the iterator classname for the ArrayObject. | ArrayObject |
getMetadata() | Retrieve metadata for the storage object or a specific metadata key | ArrayStorage |
getRequestAccessTime() | Retrieve the request access time | ArrayStorage |
isImmutable() | Is the storage container marked as isImmutable? | ArrayStorage |
isLocked() | Is the object or key marked as locked? | ArrayStorage |
ksort() | Sort the entries by key | ArrayObject |
lock() | Lock this storage instance, or a key within it | ArrayStorage |
markImmutable() | Mark the storage container as isImmutable | ArrayStorage |
natcasesort() | Sort an array using a case insensitive "natural order" algorithm | ArrayObject |
natsort() | Sort entries using a "natural order" algorithm | ArrayObject |
offsetExists() | Returns whether the requested key exists | ArrayObject |
offsetGet() | Returns the value at the specified key | ArrayObject |
offsetSet() | ArrayStorage | |
offsetUnset() | Unsets the value at the specified key | ArrayObject |
serialize() | Serialize an ArrayObject | ArrayObject |
setFlags() | Sets the behavior flags | ArrayObject |
setIteratorClass() | Sets the iterator classname for the ArrayObject | ArrayObject |
setMetadata() | Set storage metadata | ArrayStorage |
toArray() | Cast the object to an array | ArrayStorage |
uasort() | Sort the entries with a user-defined comparison function and maintain key association | ArrayObject |
uksort() | Sort the entries by keys using a user-defined comparison function | ArrayObject |
unlock() | Unlock an object or key marked as locked | ArrayStorage |
unserialize() | Unserialize an ArrayObject | ArrayObject |
Constructor
Instantiates storage as an ArrayObject, allowing property access. Also sets the initial request access time.
Parameter Name | Type | Description |
---|---|---|
$input | array | |
$flags | int | |
$iteratorClass | string |
Returns:
Returns the value at the specified key by reference
Parameter Name | Type | Description |
---|---|---|
$key | mixed |
Returns: mixed
Returns whether the requested key exists
Parameter Name | Type | Description |
---|---|---|
$key | mixed |
Returns: bool
Sets the value at the specified key to value
Parameter Name | Type | Description |
---|---|---|
$key | mixed | |
$value | mixed |
Returns: void
Unsets the value at the specified key
Parameter Name | Type | Description |
---|---|---|
$key | mixed |
Returns: void
Appends the value
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: void
Sort the entries by value
Returns: void
Clear the storage object or a subkey of the object
Parameter Name | Type | Description |
---|---|---|
$key | null|int|string |
Returns: \ArrayStorage
Get the number of public properties in the ArrayObject
Returns: int
Exchange the array for another one.
Parameter Name | Type | Description |
---|---|---|
$data | array|\ArrayObject |
Returns: array
Load the storage from another array
Overwrites any data that was previously set.
Parameter Name | Type | Description |
---|---|---|
$array | array |
Returns: \ArrayStorage
Creates a copy of the ArrayObject.
Returns: array
Gets the behavior flags.
Returns: int
Create a new iterator from an ArrayObject instance
Returns: \Iterator
Gets the iterator classname for the ArrayObject.
Returns: string
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.
Parameter Name | Type | Description |
---|---|---|
$key | null|int|string |
Returns: mixed
Retrieve the request access time
Returns: float
Is the storage container marked as isImmutable?
Returns: bool
Is the object or key marked as locked?
Parameter Name | Type | Description |
---|---|---|
$key | null|int|string |
Returns: bool
Sort the entries by key
Returns: void
Lock this storage instance, or a key within it
Parameter Name | Type | Description |
---|---|---|
$key | null|int|string |
Returns: \ArrayStorage
Mark the storage container as isImmutable
Returns: \ArrayStorage
Sort an array using a case insensitive "natural order" algorithm
Returns: void
Sort entries using a "natural order" algorithm
Returns: void
Returns whether the requested key exists
Parameter Name | Type | Description |
---|---|---|
$key | mixed |
Returns: bool
Returns the value at the specified key
Parameter Name | Type | Description |
---|---|---|
$key | mixed |
Returns: mixed
Parameter Name | Type | Description |
---|---|---|
$key | mixed | |
$value | mixed |
Returns:
Unsets the value at the specified key
Parameter Name | Type | Description |
---|---|---|
$key | mixed |
Returns: void
Serialize an ArrayObject
Returns: string
Sets the behavior flags
Parameter Name | Type | Description |
---|---|---|
$flags | int |
Returns: void
Sets the iterator classname for the ArrayObject
Parameter Name | Type | Description |
---|---|---|
$class | string |
Returns: void
Set storage metadata
Metadata is used to store information about the data being stored in the object. Some example use cases include:
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed | |
$overwriteArray | bool | Whether |
Returns: \ArrayStorage
Cast the object to an array
Parameter Name | Type | Description |
---|---|---|
$metaData | bool | Whether |
Returns: array
Sort the entries with a user-defined comparison function and maintain key association
Parameter Name | Type | Description |
---|---|---|
$function | callable |
Returns: void
Sort the entries by keys using a user-defined comparison function
Parameter Name | Type | Description |
---|---|---|
$function | callable |
Returns: void
Unlock an object or key marked as locked
Parameter Name | Type | Description |
---|---|---|
$key | null|int|string |
Returns: \ArrayStorage
Unserialize an ArrayObject
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns: void