Fully Qualified Name: | Laminas\Session\Container |
Extends: | AbstractContainer |
Session storage container
Allows for interacting with session storage in isolated containers, which may have their own expiries, or even expiries per key in the container. Additionally, expiries may be absolute TTLs or measured in "hops", which are based on how many times the key or container were accessed.
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | AbstractContainer |
__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 |
count() | Get the number of public properties in the ArrayObject | ArrayObject |
exchangeArray() | Exchange the current array with another array or object. | AbstractContainer |
getArrayCopy() | Creates a copy of the specific container name | AbstractContainer |
getDefaultManager() | Get the default ManagerInterface instance | AbstractContainer |
getFlags() | Gets the behavior flags. | ArrayObject |
getIterator() | Iterate over session container | AbstractContainer |
getIteratorClass() | Gets the iterator classname for the ArrayObject. | ArrayObject |
getManager() | Get manager instance | AbstractContainer |
getName() | Get container name | AbstractContainer |
ksort() | Sort the entries by key | ArrayObject |
natcasesort() | Sort an array using a case insensitive "natural order" algorithm | ArrayObject |
natsort() | Sort entries using a "natural order" algorithm | ArrayObject |
offsetExists() | Determine if the key exists | AbstractContainer |
offsetGet() | Retrieve a specific key in the container | Container |
offsetSet() | Store a value within the container | AbstractContainer |
offsetUnset() | Unset a single key in the container | AbstractContainer |
serialize() | Serialize an ArrayObject | ArrayObject |
setDefaultManager() | Set the default ManagerInterface instance to use when none provided to constructor | AbstractContainer |
setExpirationHops() | Set expiration hops for the container, a single key, or set of keys | AbstractContainer |
setExpirationSeconds() | Set expiration TTL | AbstractContainer |
setFlags() | Sets the behavior flags | ArrayObject |
setIteratorClass() | Sets the iterator classname for the ArrayObject | ArrayObject |
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 |
unserialize() | Unserialize an ArrayObject | ArrayObject |
Constructor
Provide a name ('Default' if none provided) and a ManagerInterface instance.
Parameter Name | Type | Description |
---|---|---|
$name | null|string | |
$manager | \Manager |
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
Get the number of public properties in the ArrayObject
Returns: int
Exchange the current array with another array or object.
Parameter Name | Type | Description |
---|---|---|
$input | array|object |
Returns: array Returns the old array
Creates a copy of the specific container name
Returns: array
Get the default ManagerInterface instance
If none provided, instantiates one of type {@link $managerDefaultClass}
Returns: \Manager
Gets the behavior flags.
Returns: int
Iterate over session container
Returns: \Iterator
Gets the iterator classname for the ArrayObject.
Returns: string
Get manager instance
Returns: \Manager
Get container name
Returns: string
Sort the entries by key
Returns: void
Sort an array using a case insensitive "natural order" algorithm
Returns: void
Sort entries using a "natural order" algorithm
Returns: void
Determine if the key exists
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: bool
Retrieve a specific key in the container
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: mixed
Store a value within the container
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed |
Returns: void
Unset a single key in the container
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: void
Serialize an ArrayObject
Returns: string
Set the default ManagerInterface instance to use when none provided to constructor
Parameter Name | Type | Description |
---|---|---|
$manager | \Manager |
Returns: void
Set expiration hops for the container, a single key, or set of keys
Parameter Name | Type | Description |
---|---|---|
$hops | int | |
$vars | null|string|array |
Returns: \Container
Set expiration TTL
Set the TTL for the entire container, a single key, or a set of keys.
Parameter Name | Type | Description |
---|---|---|
$ttl | int | TTL |
$vars | string|array|null |
Returns: \Container
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
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
Unserialize an ArrayObject
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns: void