Session

Usage

class Span extends \Mesour\UI\Control
{

        /** @var \Mesour\Components\Session\SessionSection */
        private $sessionSection;

        public function __construct($name = NULL, \Mesour\Components\IComponent $parent = NULL)
        {
                parent::__construct($name, $parent);
                $this->sessionSection = $this->getSession()->getSection('my_section');
        }

        public function setSomeToMyKey($value)
        {
                $this->sessionSection->set('my_key', $value);
        }

        public function getFromMyKey()
        {
                return $this->sessionSection->get('my_key');
        }

        public function getAllFromMySessionSection()
        {
                return $this->sessionSection->get();
        }

}