Get session

@return \League\OAuth2\Server\Entity\SessionEntity
12048
public function getSession()
    {
        if ($this->session instanceof SessionEntity) {
            return $this->session;
        }

        $this->session = $this->server->getSessionStorage()->getByAccessToken($this);

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

        return $session;
    }
1107919
public function getSession()
    {
        if (self::$_oSession == null) {
            self::$_oSession = \OxidEsales\Eshop\Core\Registry::getSession();
        }

        return self::$_oSession;
    }
934346
public function session ()
	{
		
		if (!($this->session instanceof Session))
		{
			$this->session	= Session::singleton ($this->sessionID);
		}
		
		return $this->session;
		
	}
621561
protected function getSession()
    {
        if ($this->session === null) {
            throw new FoundationException(
                sprintf(
                    "Client pooler '%s' is not initialized, session not set.",
                    get_class($this)
                )
            );
        }

        return $this->session;
    }
385887
protected function getSession()
    {
        $injector = Injector::inst();
        if ($injector->has(HTTPRequest::class)) {
            return $injector->get(HTTPRequest::class)->getSession();
        } elseif (Controller::has_curr()) {
            return Controller::curr()->getRequest()->getSession();
        }
        throw new Exception('No HTTPRequest object or controller available yet!');
    }
885121
public function getScopes(SessionEntity $session)
    {
        // TODO: Check this before pushing
        $result = $this->getConnection()->table('oauth_session_scopes')
                  ->select('oauth_scopes.*')
                  ->join('oauth_scopes', 'oauth_session_scopes.scope_id', '=', 'oauth_scopes.id')
                  ->where('oauth_session_scopes.session_id', $session->getId())
                  ->get();

        $scopes = [];

        foreach ($result as $scope) {
            $scopes[] = (new ScopeEntity($this->getServer()))->hydrate([
                'id' => $scope->id,
                'description' => $scope->description,
            ]);
        }

        return $scopes;
    }
285441
public function managerGetSessions()
    {
        $theSessions = [];

        /* @var $session \Thruway\Session */
        foreach ($this->sessions as $session) {

            $sessionRealm = null;
            // just in case the session is not in a realm yet
            if ($session->getRealm() !== null) {
                $sessionRealm = $session->getRealm()->getRealmName();
            }

            if ($session->getAuthenticationDetails() !== null) {
                $authDetails = $session->getAuthenticationDetails();
                $auth        = [
                    'authid'     => $authDetails->getAuthId(),
                    'authmethod' => $authDetails->getAuthMethod()
                ];
            } else {
                $auth = new \stdClass();
            }

            $theSessions[] = [
                'id'           => $session->getSessionId(),
                'transport'    => $session->getTransport()->getTransportDetails(),
                'messagesSent' => $session->getMessagesSent(),
                'sessionStart' => $session->getSessionStart(),
                'realm'        => $sessionRealm,
                'auth'         => $auth
            ];
        }

        return $theSessions;
    }
163327
function getUserFromPHPSession() {
		if ($this->user == null) {
            $sid = $this->request->session('usersid', '');
            if ($sid == '') {
                // try with a get key
                $sid = $this->request->get('sessionid', '');
            }
			$this->user = $this->getUserFromSession($sid);
		}
        return $this->user;
    }
1186257
public function getUserEntityRepository() 
    {
    	if(isset($this->er['User'])) {
    		return $this->er['User'];
    	}
    	$entityRepository = $this->getEntityManager()->getRepository('Neobazaar\Entity\User');
    	$entityRepository->setServiceLocator($this->getServiceManager());
    	$this->er['User'] = $entityRepository;
    	
    	return $this->er['User'];
    }
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;
        }
    }
77354
public function getSession()
    {
        $sessionKey = $this->getSessionKey();

        return $this->sessionManager->has($sessionKey) ? $this->sessionManager->get($sessionKey) : new Collection;
    }
1022061
private function session()
    {
        if ($this->session === null) {
            $this->session = DI::getInstance()->get('session');
        }

        return $this->session;
    }
1228585
public static function get()
	{
		self::checkSessionStarted();

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

		return $res;
	}
960970
public static function getSession()
    {
        if (is_null(self::$session)) {
            if (PHPSession::singleton()->hasAttribute(self::PHPSESSION_SESSION_KEY)) {
                $session = PHPSession::singleton()->getAttribute(self::PHPSESSION_SESSION_KEY);
                if (! $session instanceof common_session_Session) {
                    throw new common_exception_Error('Non session stored in php-session');
                }
                self::$session = $session;
            } else {
                self::$session = new common_session_AnonymousSession();
            }
        }
        if (self::$session instanceof ServiceLocatorAwareInterface) {
            self::$session->setServiceLocator(ServiceManager::getServiceManager());
        }
        return self::$session;
    }
8633
public function getSession(Request $request)
    {
        return tap($this->manager->driver(), function (Session $session) use ($request) {
            $session->setId($request->cookies->get($session->getName()));
        });
    }
1256642
private function getSessionContainer()
    {
        if (!$this->sessionContainer) {
            $this->sessionContainer = new Container(self::SESSION_NAMESPACE);
        }

        return $this->sessionContainer;
    }