protected function loadSession(array &$session = null)
    {
        if (null === $session) {
            $session = &$_SESSION;
        }

        //initialize the attributes bag
        $key = $this->getAttributes()->getName();

        $session[$key] = isset($session[$key]) ? $session[$key] : array();
        $this->getAttributes()->initialize($session[$key]);

        $this->started = true;
        $this->closed = false;
    }