getSession

@param mixed $create The params to create.

@access public
@return void
778188
public function getSession($create=true)
    {
        global $logger;
        if ($this->_session == null && $create==true) {
            $this->_session = SecurityUtils::getSecurityManager()->startSession();
        }
        return $this->_session;

    }
408285
public function getSession()
    {
        try {
            $session = \PagSeguro\Services\Session::create(
                $this->getPagSeguroCredentials()
            );
            return $session->getResult();
        } catch (\Exception $exception) {
            throw $exception;
        }
    }
66117
static function getSession(){
		if(self::$session == null){
			$sessionImplClassName = Settings::getSettings('php-platform/session',"session.class");
			try{
				$sessionImplReflectionClass = new \ReflectionClass($sessionImplClassName);
			}catch (\ReflectionException $re){
				throw new ProgrammingError("session implementation class is not configured or invalid");
			}
			$sessionInterfaceName = 'PhpPlatform\Session\Session';
			if(!$sessionImplReflectionClass->implementsInterface($sessionInterfaceName)){
				throw new ProgrammingError("$sessionImplClassName does not implement $sessionInterfaceName");
			}
			
			$sessionGetInstanceReflectionMethod = $sessionImplReflectionClass->getMethod('getInstance');
			
			self::$session = $sessionGetInstanceReflectionMethod->invokeArgs(null,array());
		}
		return self::$session;
	}
1133070
public function getSession($varname, $default = false)
    {
        if(isset($this->sessionvars[$varname])) {
            return $this->sessionvars[$varname];
        } else {
            return $default;
        }
    }
157023
public SessionImpl getSession(SessionInfo info, boolean create) {
        ServletContext key = info.getContext();
        Map<String, SessionImpl> sessions = this.groupings.get(key);
        if (null == sessions) {
            synchronized (this.groupings) {
                sessions = this.groupings.get(key);
                if (null == sessions) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "Creating session group: " + key);
                    }
                    sessions = new HashMap<String, SessionImpl>();
                    this.groupings.put(key, sessions);
                }
            } // end-sync
        }
        SessionImpl session = null;
        String id = info.getID();
        if (null != id) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "getSession: existing id=" + id);
            }
            session = sessions.get(id);
            if (null != session) {
                // check expiration on existing session
                if (session.checkExpiration(true)) {
                    if (!session.isInvalid()) {
                        // if it wasn't already invalidated, do so now
                        session.invalidate();
                    }
                    session = null;
                }
            }
            id = null;
        } // check-existing

        // if we don't have a session now (could have been expired above)
        // and the create flag is true, make a new one now
        if (null == session && create) {
            id = this.idgen.getID();
            session = new SessionImpl(id, info.getContext());
            synchronized (sessions) {
                sessions.put(id, session);
            } // end-sync

            // created a session, make sure the purge timer is running
            if (null == this.future) {
                synchronized (this.timerLock) {
                    startPurgeTimer();
                } // end-sync
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getSession: " + session);
        }
        return session;
    }
1142319
public function getSession()
    {
        if (Mage::app()->getStore()->isAdmin()) {
            $session = Mage::getSingleton('adminhtml/session_quote');
        } else {
            $session = Mage::getSingleton('checkout/session');
        }

        return $session;
    }
1057420
public function getSessionData ()
	{
		
		if (!$this->_sessionData)
		{
			$this->_sessionData	= unserialize ($this->session ()->get (get_called_class ()));
		}
		
		return $this->_sessionData;
		
	}
1274311
public function createSession($name)
    {
        $this->sessions[$name] = $this
            ->builderMustExist($name)
            ->builders[$name]
            ->buildSession($name)
            ;

        $session = $this->sessions[$name];

        foreach ($this->post_configurations[$name] as $callable) {
            call_user_func($callable, $session);
        }

        if ($this->logger !== null) {
            $session->setLogger($this->logger);
        }

        return $session;
    }
934346
public function session ()
	{
		
		if (!($this->session instanceof Session))
		{
			$this->session	= Session::singleton ($this->sessionID);
		}
		
		return $this->session;
		
	}
982317
public function getSession($name)
    {
        if (!$this->hasSession($name)) {
            $this->createSession($name);
        }

        return $this->sessions[$name];
    }
355449
public function getItem($create = false)
    {
        $item = $this->_mixer->getState()->getItem();

        if ($item == null && $this->_mixer->getState()->isUnique()) {
            $item = $this->fetchEntity(new AnCommandContext());
        }

        //create an new entity
        if ($item == null && $create) {
            $this->_mixer->getState()->setItem($this->getRepository()->getEntity());
        }

        return $this->_mixer->getState()->getItem();
    }
1094015
public function getSession()
    {
        if (null === $this->session) {
            // Using fully qualified name, to ensure polyfill class alias is used
            $this->session = new SessionContainer($this->getId());
        }

        return $this->session;
    }
511815
public function getSession(): ?Session
    {
        if (!$this->hasSession()) {
            $this->setSession($this->getDefaultSession());
        }
        return $this->session;
    }
965528
public function createSession($options)
    {
        $request = new Request('POST', '/session/create');
        try {
            $response = $this->client->send($request, [
                'debug' => $this->isDebug(),
                'form_params' => $this->postFieldsForOptions($options)
            ]);
            $sessionXml = $this->getResponseXml($response);
        } catch (\RuntimeException $e) {
            // TODO: test if we have a parse exception and handle it, otherwise throw again
            throw $e;
        } catch (\Exception $e) {
            $this->handleException($e);
            return;
        }
        return $sessionXml;
    }
1228585
public static function get()
	{
		self::checkSessionStarted();

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

		return $res;
	}
932737
protected function initSession(Request $request)
    {
        $this->checkParams($request->request);

        $this->initSessionBag(true);
        foreach($request->request->all() as $key => $value) {
            $this->sessionBag->set($key, $value);
        }
        if ($request->request->has('returnUrl')) {
            $this->sessionBag->set("referrer", $request->request->get('returnUrl'));
        } else {
            $this->sessionBag->set("referrer", $request->server->get("HTTP_REFERER"));
        }
    }
328934
public static function Session() {
      if (is_null(self::$_Session))
         self::$_Session = self::Factory(self::AliasSession);
      return self::$_Session;
   }