Your IP : 216.73.216.81


Current Path : /srv/web/sites/trentinoplant.it/httpdocs/vendor1/laminas/laminas-session/src/
Upload File :
Current File : /srv/web/sites/trentinoplant.it/httpdocs/vendor1/laminas/laminas-session/src/Container.php

<?php

namespace Laminas\Session;

/**
 * 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.
 *
 * @template TKey of string
 * @template TValue
 * @template-extends AbstractContainer<TKey, TValue>
 */
class Container extends AbstractContainer
{
    /**
     * Retrieve a specific key in the container
     *
     * @param  string $key
     * @return mixed
     */
    public function &offsetGet($key)
    {
        $ret = null;
        if (! $this->offsetExists($key)) {
            return $ret;
        }
        $storage = $this->getStorage();
        $name    = $this->getName();
        $ret     = &$storage[$name][$key];

        return $ret;
    }
}