Returns a session storage

@return  ISession
767456
public function getSession(): ISession
    {
        if ($this->session === null) {
            if (!isset($this->implicit['session'])) {
                throw new \RuntimeException('The default session storage was not set');
            }
            $this->session = new Session($this->getCollector()->getSessionHandler($this->implicit['session']));
        }

        return $this->session;
    }
1093481
public function getSession()
    {
        if (is_null($this->_session)) {
            $this->_session = $this->getContainer()->get('session');
        }
        return $this->_session;
    }
1348474
protected function refreshSession()
    {
        //  Get the user; be wary of admin's logged in as other people
        $oSession = Factory::service('Session', 'nails/module-auth');
        if ($this->wasAdmin()) {

            $recoveryData = $this->getAdminRecoveryData();

            if (!empty($recoveryData->newUserId)) {
                $me = $recoveryData->newUserId;
            } else {
                $me = $oSession->getUserData('id');
            }

        } else {
            $me = $oSession->getUserData('id');
        }

        //  Is anybody home? Hello...?
        if (!$me) {
            $me = $this->me;
            if (!$me) {
                return false;
            }
        }

        $me = $this->getById($me);

        // --------------------------------------------------------------------------

        /**
         * If the user is isn't found (perhaps deleted) or has been suspended then
         * obviously don't proceed with the log in
         */

        if (!$me || !empty($me->is_suspended)) {
            $this->clearRememberCookie();
            $this->clearActiveUser();
            $this->clearLoginData();
            $this->bIsLoggedIn = false;
            return false;
        }

        // --------------------------------------------------------------------------

        //  Store this entire user in memory
        $this->setActiveUser($me);

        // --------------------------------------------------------------------------

        //  Set the user's logged in flag
        $this->bIsLoggedIn = true;

        // --------------------------------------------------------------------------

        //  Update user's `last_seen` and `last_ip` properties
        $oDb    = Factory::service('Database');
        $oInput = Factory::service('Input');

        $oDb->set('last_seen', 'NOW()', false);
        $oDb->set('last_ip', $oInput->ipAddress());
        $oDb->where('id', $me->id);
        $oDb->update($this->table);

        return true;
    }
1116257
public static function getSession()
    {
        if (CNabuHTTPSession::$nb_session === null) {
            CNabuHTTPSession::$nb_session = new CNabuHTTPSession();
            CNabuHTTPSession::$nb_session->init();
        }

        return CNabuHTTPSession::$nb_session;
    }
1112554
public function getAllSession()
    {
        if (isset($this->objectSession) && $this->objectSession != NULL && is_object($this->objectSession)) {
            $this->logger->info(__FUNCTION__, 'Session with CI Session Class');
            $data = $this->objectSession->get_userdata();
        } else {
            $this->logger->info(__FUNCTION__, 'Session with The Http Foundation Component');
            $data = $this->session->all();
        }
        $this->logger->info(__FUNCTION__, 'ALL Session Data: ' . json_encode($data));

        return $data;
    }
1228585
public static function get()
	{
		self::checkSessionStarted();

		$res = array();
		if (isset($_SESSION[self::$sessionName]))
		{
			$res = $_SESSION[self::$sessionName];
			unset($_SESSION[self::$sessionName]);
		}

		return $res;
	}
120953
protected function getStore()
    {
        $store = $this->getSessionContainer();

        if ( empty( $store['stack'] ) )
        {
            $store['stack'] = array();
        }

        if ( empty( $store['steps'] ) )
        {
            $store['steps'] = array();
        }

        return $store;
    }
1142319
public function getSession()
    {
        if (Mage::app()->getStore()->isAdmin()) {
            $session = Mage::getSingleton('adminhtml/session_quote');
        } else {
            $session = Mage::getSingleton('checkout/session');
        }

        return $session;
    }
124349
public function regenerate()
    {
        // we will regenerate session ID
        session_regenerate_id(true);

        session_write_close();

        if (isset($_SESSION)) {
            $data = $_SESSION;
            session_start();
            $_SESSION = $data;
        } else {
            session_start();
        }

        // we will store session global variable reference into storage property
        $this->storage = &$_SESSION;

        return $this;
    }
624210
public function session() {
		if ($this->session === null) {
			$name = Yesf::app()->getConfig('session.name', Yesf::CONF_ENV, 'YESFSESSID');
			$type = Yesf::app()->getConfig('session.type', Yesf::CONF_ENV, 'cookie');
			$handler = Container::getInstance()->get(Dispatcher::class)->getSessionHandler();
			if ($type === 'cookie') {
				if (!isset($this->cookie[$name])) {
					do {
						$id = Session::generateId();
					} while ($handler->read($id) !== '');
					$saved = '';
					Utils::call($this->cookie_handler, [$name, $id, 0, '/']);
				} else {
					$id = $this->cookie[$name];
					$saved = $handler->read($id);
				}
			} else {
				if (!isset($this->get[$name])) {
					do {
						$id = Session::generateId();
					} while ($handler->read($id) !== '');
					$saved = '';
				} else {
					$id = $this->get[$name];
					$saved = $handler->read($id);
				}
			}
			$this->session = new Session($id, $saved);
		}
		return $this->session;
	}
787465
public static function getSession()
    {
        if (!isset(self::$session)) {
            $session_factory = new SessionFactory();
            self::$session = $session_factory->newInstance($_COOKIE);
        }

        return self::$session;
    }
1355704
private function getSession()
    {
        $vars = array(
            'method' => 'auth.getSession',
            'api_key' => $this->apiKey,
            'token' => $this->token
        );
        $sig = $this->apiSig($this->apiSecret, $vars);
        $vars['api_sig'] = $sig;

        if ($call = $this->apiGetCall($vars)) {
            $this->username = (string) $call->session->name;
            $this->sessionKey = (string) $call->session->key;
            $this->subscriber = (string) $call->session->subscriber;
        } else {
            return false;
        }
    }
660965
public function setSessionStorage(SessionInterface $storage)
    {
        $storage->setServer($this);
        $this->sessionStorage = $storage;

        return $this;
    }
1328909
public function getUserSession() {
		if (isset($_SESSION['user_'.$this->usernameKey])) {
			$arrUser = array();
			foreach ($_SESSION as $strKey => $strValue)
				if (substr($strKey, 0, 4) == 'user_')
					$arrUser[substr($strKey, 4)] = $strValue;
			return $arrUser;
		}

		return false;
	}
27137
private function getFromSession()
    {
        if ($this->exists()) {
            $flashes = $this->session->get($this->key);

            foreach ($flashes as $flash) {
                $this->current->push(new Flash($flash['level'], $flash['message']));
            }
        }
    }
104411
protected function getSession()
    {
        if (isset($_SESSION[$this->key])) {
            $value = $_SESSION[$this->key];

            if ($value) {
                return unserialize($value);
            }
        }
    }
1268539
public function getCurrentSession()
    {
        if (is_null($this->currentSession)) {
            $this->currentSession = $this->mapper->mapFromStorage(
                $this->request($this->buildUrl(new CurrentSession()), 'GET')
            );
        }
        if (!($this->currentSession instanceof CurrentSession)) {
            $this->currentSession = null;
            throw new NotLoggedInException('Authorization required');
        }
        return $this->currentSession;
    }