code/libraries/joomlatools/library/user/session/abstract.php
public function getContainer($name)
    {
        if (!($name instanceof KObjectIdentifier))
        {
            //Create the complete identifier if a partial identifier was passed
            if (is_string($name) && strpos($name, '.') === false)
            {
                $identifier = $this->getIdentifier()->toArray();
                $identifier['path'] = array('session', 'container');
                $identifier['name'] = $name;

                $identifier = $this->getIdentifier($identifier);
            }
            else $identifier = $this->getIdentifier($name);
        }
        else $identifier = $name;

        if (!isset($this->_containers[$identifier->name]))
        {
            $container = $this->getObject($identifier);

            if (!($container instanceof KUserSessionContainerInterface))
            {
                throw new UnexpectedValueException(
                    'Container: '. get_class($container) .' does not implement KUserSessionContainerInterface'
                );
            }

            //Load the container from the session
            $namespace = $this->getNamespace();
            $container->load($_SESSION[$namespace]);

            $this->_containers[$container->getIdentifier()->name] = $container;
        }
        else $container = $this->_containers[$identifier->name];

        return $container;
    }
public function getContainer($name)
    {
        if (!($name instanceof KObjectIdentifier))
        {
            //Create the complete identifier if a partial identifier was passed
            if (is_string($name) && strpos($name, '.') === false)
            {
                $identifier = $this->getIdentifier()->toArray();
                $identifier['path'] = array('session', 'container');
                $identifier['name'] = $name;

                $identifier = $this->getIdentifier($identifier);
            }
            else $identifier = $this->getIdentifier($name);
        }
        else $identifier = $name;

        if (!isset($this->_containers[$identifier->name]))
        {
            $container = $this->getObject($identifier);

            if (!($container instanceof KUserSessionContainerInterface))
            {
                throw new UnexpectedValueException(
                    'Container: '. get_class($container) .' does not implement KUserSessionContainerInterface'
                );
            }

            //Load the container from the session
            $namespace = $this->getNamespace();
            $container->load($_SESSION[$namespace]);

            $this->_containers[$container->getIdentifier()->name] = $container;
        }
        else $container = $this->_containers[$identifier->name];

        return $container;
    }
public function getContainer ( $ name ) { if ( ! ( $ name instanceof KObjectIdentifier ) ) { //Create the complete identifier if a partial identifier was passed if ( is_string ( $ name ) && strpos ( $ name , '.' ) === false ) { $ identifier = $ this -> getIdentifier ( ) -> toArray ( ) ; $ identifier [ 'path' ] = array ( 'session' , 'container' ) ; $ identifier [ 'name' ] = $ name ; $ identifier = $ this -> getIdentifier ( $ identifier ) ; } else $ identifier = $ this -> getIdentifier ( $ name ) ; } else $ identifier = $ name ; if ( ! isset ( $ this -> _containers [ $ identifier -> name ] ) ) { $ container = $ this -> getObject ( $ identifier ) ; if ( ! ( $ container instanceof KUserSessionContainerInterface ) ) { throw new UnexpectedValueException ( 'Container: ' . get_class ( $ container ) . ' does not implement KUserSessionContainerInterface' ) ; } //Load the container from the session $ namespace = $ this -> getNamespace ( ) ; $ container -> load ( $ _SESSION [ $ namespace ] ) ; $ this -> _containers [ $ container -> getIdentifier ( ) -> name ] = $ container ; } else $ container = $ this -> _containers [ $ identifier -> name ] ; return $ container ; }
Get the session attribute container object

If the container does not exist a container will be created on the fly.

@param   mixed $name An object that implements ObjectInterface, ObjectIdentifier object
or valid identifier string
@throws UnexpectedValueException    If the identifier is not a session container identifier
@return KUserSessionContainerInterface
Get the session attribute container object