Load data from $_SESSION if exists
965343
protected function refresh()
    {
        if (Session::get()->exists(App::get()->shortName . $this->sessionKey)) {
            $state = Session::get()->value(App::get()->shortName . $this->sessionKey);
            $this->_userData = $state['vars'];
            $this->_rights = $state['rights'];
            $this->connected = (count($this->_userData) > 0);
        }
    }
129981
function clearSessionData($name = '', $clearErrors = true){
		if(!$name) $name = $this->owner->FormName();
		\Session::clear("FormInfo.{$name}.data");
		if($clearErrors) \Session::clear("FormInfo.{$name}.errors");
	}
729316
function load_data ($input = null) {
		$data = null;
		$file = null;
		if ( $input === null ) {
			$file = $this->file;
		} elseif ( file_exists($input) ) {
			$file = $input;
		} else {
			$data = $input;
		}
		if ( !empty($data) || $data = $this->_rfile($file) ) {
			if ( $this->file != $file ) $this->file = $file;
			if ( preg_match('/\.php$/i', $file) && preg_match('/<\?.*?\?>(.*)/ims', $data, $strip) ) {
				$data = ltrim($strip[1]);
			}
			if ( $this->convert_encoding ) $data = iconv($this->input_encoding, $this->output_encoding, $data);
			if ( substr($data, -1) != "\n" ) $data .= "\n";
			$this->file_data = &$data;
			return true;
		}
		return false;
	}
293796
public function read($session_id)
    {
        //string casting is a fix for PHP 7
        //when strict type are enable
        return (string) $this->pdo->queryWithParam(
            'SELECT session_data FROM session WHERE session_id = :session_id',
            [[':session_id', $session_id, \PDO::PARAM_STR]]
        )->fetchColumn();
    }
37692
public function reload()
    {
        // collect updated data from previous appends
        $merge_data = array();
        foreach ((array)$this->appends as $var) {
            $path = explode('.', $var);
            $value = $this->get_node($path, $_SESSION);
            $k = array_pop($path);
            $node = &$this->get_node($path, $merge_data);
            $node[$k] = $value;
        }

        if ($this->key) {
            $data = $this->read($this->key);
        }

        if ($data) {
            session_decode($data);

            // apply appends and unsets to reloaded data
            $_SESSION = array_merge_recursive($_SESSION, $merge_data);

            foreach ((array)$this->unsets as $var) {
                if (isset($_SESSION[$var])) {
                    unset($_SESSION[$var]);
                }
                else {
                    $path = explode('.', $var);
                    $k = array_pop($path);
                    $node = &$this->get_node($path, $_SESSION);
                    unset($node[$k]);
                }
            }
        }
    }
1213806
static function load($controller, $action = '', $params = array())
	{

		$class_name = ucfirst($controller);
		$method = $action;
		$tc = "Controller\\" . $class_name;
		if (!class_exists($tc)) return self::er("Class $tc does not exist.");
		$this_object = new $tc($params);


		if (!method_exists($this_object, $method)) {
			return self::er("Method $method in $tc does not exist.");
		}


		if (!is_callable(array($this_object, $method))) return self::er("Method $method in $tc is not callable.");
		if (is_callable(array($this_object, "__before"))) {
			call_user_func(array($this_object, "__before"));
		}


		call_user_func(array($this_object, $method));

		if (is_callable(array($this_object, "__after"))) {
			call_user_func(array($this_object, "__after"));
		}
		return $this_object;
	}
166137
private function load()
    {
        if (\count($this->attributes)) {
            return;
        }

        $sessionBag         = $this->session->getBag($this->getSessionBagKey());
        $databaseSessionBag = $this->session->getBag($this->getDatabaseSessionBagKey());

        $this->attributes = \array_merge(
            (array) $sessionBag->get($this->getScope()),
            (array) $databaseSessionBag->get($this->getScope())
        );
    }
185955
public function load()
    {
        // We only care about GET requests at the moment
        if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
            return;
        }

        $file = $_SERVER['REQUEST_URI'] . 'index.html';
        if (is_file($this->destination . $file)) {
            $contents = file_get_contents($this->destination . $file);
            do_action('staticwp_pre_cache_hit', $_SERVER['REQUEST_URI']);
            echo apply_filters('staticwp_cache_hit_contents', $contents);
            do_action('staticwp_post_cache_hit', $_SERVER['REQUEST_URI']);
            exit();
        } else {
            do_action('staticwp_cache_miss', $_SERVER['REQUEST_URI']);
        }
    }
454739
function load() {
			$all_plugins_data = $this->get_all_data();
			$this->_data      = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
				$all_plugins_data[ $this->_secondary_id ] :
				array();
		}
821942
async def load_user(self, request):
        """"""
        if USER_KEY not in request:
            session = await self.load(request)
            if 'id' not in session:
                return None

            request[USER_KEY] = request.user = await self._user_loader(session['id'])

        return request[USER_KEY]
633009
def init_session(db_url=None, echo=False, engine=None, settings=None):
    
    if engine is None:
        engine = init_engine(db_url=db_url, echo=echo, settings=settings)
    return sessionmaker(bind=engine)
797686
def load_data(self, data, callback=None):
        ''''''
        return self.backend.execute(
            self.value_pickler.load_iterable(data, self.session), callback)
1036009
function load($data = [])
    {
        foreach ($this as $k => $v) {
            if ($k == 'table' || $k == 'where') {
                continue;
            }
            if (isset($data[$k])) {
                $this->$k = $data[$k];
            }
        }
    }
45695
def load_session_from_file(self, username: str, filename: Optional[str] = None) -> None:
        
        if filename is None:
            filename = get_default_session_filename(username)
        with open(filename, 'rb') as sessionfile:
            self.context.load_session_from_file(username, sessionfile)
            self.context.log("Loaded session from %s." % filename)
784716
public function read($session_id)
    {
        foreach ($this->getHandlers() as $handler) {
            if ($data = $handler->read($session_id)) {
                return $data;
            }
        }

        return '';
    }
1143462
public function loadResult()
	{
		// Initialise variables
		$return = null;

		// Execute the query
		if (!$this->execute())
		{
			return null;
		}

		// Get the first row from the result set as an array
		if ($row = $this->fetchArray())
		{
			$return = $row[0];
		}

		// Free up system resources and return
		$this->freeResult();

		return $return;
	}
1264149
def _get_session():
    """"""
    session = getattr(g, '_session', None)
    if session is None:
        session = g._session = db.session()
    return session