Zend\Session\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.
Synopsis
class AbstractContainer
extends ArrayObject
{
- // Inherited constants from ArrayObject
- const STD_PROP_LIST = 1;
- const ARRAY_AS_PROPS = 2;
- // members
- protected string $name;
- protected ManagerInterface $manager;
- protected string $managerDefaultClass;
- protected ManagerInterface $defaultManager;
- // Inherited members from ArrayObject
- protected array $storage;
- protected int $flag;
- protected string $iteratorClass;
- protected array $protectedProperties;
- // methods
- public void __construct()
- public static void setDefaultManager()
- public static ManagerInterface getDefaultManager()
- public string getName()
- protected Container setManager()
- public ManagerInterface getManager()
- protected StorageInterface getStorage()
- protected ArrayObject createContainer()
- protected Storage|null verifyNamespace()
- protected bool expireKeys()
- protected bool expireByExpiryTime()
- protected bool expireByHops()
- public void offsetSet()
- public bool offsetExists()
- public mixed offsetGet()
- public void offsetUnset()
- public array exchangeArray()
- public Iterator getIterator()
- public Container setExpirationSeconds()
- public Container setExpirationHops()
- public array getArrayCopy()
- // Inherited methods from ArrayObject
- public void __construct()
- public bool __isset()
- public void __set()
- public void __unset()
- public mixed __get()
- public void append()
- public void asort()
- public int count()
- public array exchangeArray()
- public array getArrayCopy()
- public int getFlags()
- public Iterator getIterator()
- public string getIteratorClass()
- public void ksort()
- public void natcasesort()
- public void natsort()
- public bool offsetExists()
- public mixed offsetGet()
- public void offsetSet()
- public void offsetUnset()
- public string serialize()
- public void setFlags()
- public void setIteratorClass()
- public void uasort()
- public void uksort()
- public void unserialize()
Hierarchy
Constants
Name | Value |
---|---|
STD_PROP_LIST | 1 |
ARRAY_AS_PROPS | 2 |
Members
protected
- $defaultManager
—
Zend\Session\ManagerInterface
Default manager to use when instantiating a container without providing a ManagerInterface - $flag — int
- $iteratorClass — string
- $manager — Zend\Session\ManagerInterface
- $managerDefaultClass
—
string
Default manager class to use if no manager has been provided - $name
—
string
Container name - $protectedProperties — array
- $storage — array
Methods
protected
- createContainer() — Create a new container object on which to act
- expireByExpiryTime() — Expire a key by expiry time
- expireByHops() — Expire key by session hops
- expireKeys() — Determine whether a given key needs to be expired
- getStorage() — Get session storage object
- setManager() — Set session manager
- verifyNamespace() — Verify container namespace
public
- __construct() — Constructor
- exchangeArray() — Exchange the current array with another array or object.
- getArrayCopy() — Creates a copy of the specific container name
- getDefaultManager() — Get the default ManagerInterface instance
- getIterator() — Iterate over session container
- getManager() — Get manager instance
- getName() — Get container name
- offsetExists() — Determine if the key exists
- offsetGet() — Retrieve a specific key in the container
- offsetSet() — Store a value within the container
- offsetUnset() — Unset a single key in the container
- setDefaultManager() — Set the default ManagerInterface instance to use when none provided to constructor
- setExpirationHops() — Set expiration hops for the container, a single key, or set of keys
- setExpirationSeconds() — Set expiration TTL
Inherited from Zend\Stdlib\ArrayObject
public
- __get() — Returns the value at the specified key by reference
- __isset() — Returns whether the requested key exists
- __set() — Sets the value at the specified key to value
- __unset() — Unsets the value at the specified key
- append() — Appends the value
- asort() — Sort the entries by value
- count() — Get the number of public properties in the ArrayObject
- exchangeArray() — Exchange the array for another one.
- getArrayCopy() — Creates a copy of the ArrayObject.
- getFlags() — Gets the behavior flags.
- getIterator() — Create a new iterator from an ArrayObject instance
- getIteratorClass() — Gets the iterator classname for the ArrayObject.
- ksort() — Sort the entries by key
- natcasesort() — Sort an array using a case insensitive "natural order" algorithm
- natsort() — Sort entries using a "natural order" algorithm
- offsetExists() — Returns whether the requested key exists
- offsetGet() — Returns the value at the specified key
- offsetSet() — Sets the value at the specified key to value
- offsetUnset() — Unsets the value at the specified key
- serialize() — Serialize an ArrayObject
- setFlags() — Sets the behavior flags
- setIteratorClass() — Sets the iterator classname for the ArrayObject
- uasort() — Sort the entries with a user-defined comparison function and maintain key association
- uksort() — Sort the entries by keys using a user-defined comparison function
- unserialize() — Unserialize an ArrayObject