get the session

@return Session
777323
protected function getSession()
    {
        if (null === $this->session) {
            if (null !== $this->getRequest()) {
                $this->session = $this->request->getSession();
            }
        }

        return $this->session;
    }
612016
public function getSession()
    {
        if (is_null($this->session)) {
            $this->session = $this->cluster->connect($this->getKeyspace());
        }

        return $this->session;
    }
1264149
def _get_session():
    """"""
    session = getattr(g, '_session', None)
    if session is None:
        session = g._session = db.session()
    return session
130767
public function getCurrentSession()
    {
        if (!$this->currentSessionHash) {
            $this->currentSessionHash = $this->controller->getRequest()->getVar($this->getGetVar());

            if (!$this->currentSessionHash) {
                return false;
            }
        }

        $this->session = MultiFormSession::get()->filter([
            "Hash" => $this->currentSessionHash,
            "IsComplete" => 0
        ])->first();

        return $this->session;
    }
1093481
public function getSession()
    {
        if (is_null($this->_session)) {
            $this->_session = $this->getContainer()->get('session');
        }
        return $this->_session;
    }
1218249
public function getStorage()
    {
        if (null === $this->storage) {
            $this->setStorage(new Storage\Session(get_class($this)));
        }

        return $this->storage;
    }
305182
public function get($key) {
        if (isset($this->_session->{$key})) {
            return $this->_session->{$key};
        }
        return null;
    }
768776
public function initSession ()
	{
		
		// Get session
		
		$session	= $this->getSessionData ();
		
		// Check session is valid
		
		if ($this->checkSession ($session) !== TRUE)
		{
			return $this->Logout ('invalid_session');
		}
		
		// Load user from session
		
		$this->fromSessionData ();
		
		// Read user

		if (!$this->Read ())
		{
			return $this->Logout ('user_read_error');
		}
		
		// Reset password
		
		$this->reset ('password');
		
		// If the user is not active or the active status has changed
		
		if ($session['active'] != $this->iget ('active') || !$this->iget ('active'))
		{
			return $this->Logout ('inactive');
		}
		
		// Check if the session has timed out
		
		if ($this->session ()->timedOut ($session['last_action']))
		{
			return $this->Logout ('timeout');
		}
		
		// Update action time
		
		$this->updateLastAction ();
		
		// Set login status
		
		$this->loggedIn	= TRUE;
		
		// Redirect to originally requested URL
		
		if ($this->session ()->get ('requested_url'))
		{
			$url = $this->session ()->get ('requested_url');
			$this->session ()->set ('requested_url', FALSE);
			new Redirect ($url);
		}
		
		// return TRUE
		
		return TRUE;
		
	}
1022061
private function session()
    {
        if ($this->session === null) {
            $this->session = DI::getInstance()->get('session');
        }

        return $this->session;
    }
623439
public static HttpSession session() {
		HttpServletRequest httpServletRequest = request.get();
		return (httpServletRequest == null) ? null : httpServletRequest.getSession();
	}
926566
private function _retrieve_session(){
    if ( !$this->id ){
      // The user ID must be in the session
      $id_session = $this->get_id_session();
      $id = $this->get_session('id');
      if ( $id_session && $id ){
        $this->_sess_info($id_session);
        if (
          isset($this->sess_cfg['fingerprint']) &&
          ($this->get_print($this->_get_session('fingerprint')) === $this->sess_cfg['fingerprint'])
        ){
          $this
            ->_authenticate($id)
            ->_user_info()
            ->_init_dir()
            ->save_session();
        }
        else{
          $this->set_error(19);
        }
      }
      else{
        //$this->set_error(15);
      }
    }
    return $this;
  }
787465
public static function getSession()
    {
        if (!isset(self::$session)) {
            $session_factory = new SessionFactory();
            self::$session = $session_factory->newInstance($_COOKIE);
        }

        return self::$session;
    }
786479
public function getStorage()
    {
        if (null === $this->storage) {
            $this->setStorage(new Session(get_called_class()));
        }

        return $this->storage;
    }
982317
public function getSession($name)
    {
        if (!$this->hasSession($name)) {
            $this->createSession($name);
        }

        return $this->sessions[$name];
    }
205532
public static function get() {

        $keys = func_get_args();
        $value = $_SESSION;

        if (!empty($value) && !empty($keys)) {

            foreach ($keys as $number => $name) {

                if ($number == 0 && isset($value[$name])) {

                    $value = $value[$keys[0]];
                } else if ($number != 0 && isset($value[$name])) {

                    $value = $value[$name];
                } else {

                    return false;
                }
            }

            return $value;
        } else if (!empty($value)) {

            return $value;
        }

        return false;
    }
1057420
public function getSessionData ()
	{
		
		if (!$this->_sessionData)
		{
			$this->_sessionData	= unserialize ($this->session ()->get (get_called_class ()));
		}
		
		return $this->_sessionData;
		
	}
1256642
private function getSessionContainer()
    {
        if (!$this->sessionContainer) {
            $this->sessionContainer = new Container(self::SESSION_NAMESPACE);
        }

        return $this->sessionContainer;
    }