Retrieve a session variable

@access public
@since 1.5

@param string $key Session key

@return mixed Session variable
15311
public function get( $key ) {
		$key = sanitize_key( $key );

		return isset( $_SESSION[ $key ] ) ? json_decode( $_SESSION[ $key ] ) : false;
	}
160348
protected function getState($key)
    {
        if (!Yii::$app->has('session')) {
            return null;
        }
        /* @var \yii\web\Session $session */
        $session = Yii::$app->get('session');
        $key = $this->getStateKeyPrefix() . $key;
        $value = $session->get($key);
        return $value;
    }
233284
public function load($key)
    {
        try {
            $sth = $this->pdo->prepare(
                'SELECT * FROM sessions WHERE id = :id'
            );

            $sth->bindValue(':id', $key, \PDO::PARAM_INT);
            $sth->execute();

            $session = $sth->fetchObject();

            if ($session instanceof \stdClass) {
                return array(
                    'id'            => $session->id,
                    'last_activity' => $session->last_activity,
                    'data'          => unserialize($session->data)
                );
            }

            return null;
        } catch (\PDOException $pdoe) {
            return null;
        }
    }
1091701
public function getSessionKeyName($key)
    {
        $key_name = $key;
        if (! empty( $this->session_base_name )) {
            $key_name = $this->session_base_name.'_'.$key_name;
        }

        return $key_name;
    }
617668
public function read($key) {
        return isset($_SESSION[$this->prefix . $key]) ? $_SESSION[$this->prefix . $key] : null;
    }
1371351
public function remove($key)
    {
        if (isset($_SESSION[$this->name][$key])) {
            $value = $_SESSION[$this->name][$key];
            unset($_SESSION[$this->name][$key]);
            return $value;
        }

        return null;
    }
566149
static function get_value( $key ) {
		if( ! self::started() ){
			trigger_error("Session not started, cannot get_value", E_USER_WARNING );
			return null;
		}
		if( !is_array($key) ){
			$key = explode( '.', $key );
		}
		$Obj = self::$Session->Data;
		foreach( $key as $k ){
			if( !isset( $Obj[$k] ) ){
				return null;
			}
			$Obj = $Obj[$k];
		}
		return $Obj;
	}
478405
public function get($key)
    {
        $session = $this->getSessionData();

        return $this->has($key) ? $session[$key] : null;
    }
912292
public function getDataset($key)
    {
        $data = $this->session->get(self::KEY);
        $set = isset($data[$key])
            ? $data[$key]
            : [];
        return $set;
    }
796130
public function getCachedObject($key) {
        $cache = HttpSession::instance()->getValue("__SESSION_CACHED_ITEMS");

        $timeouts = HttpSession::instance()->getValue("__SESSION_CACHE_TIMEOUTS");
        if (is_array($timeouts) && isset($timeouts[$key])) {
            $now = new \DateTime();
            $expiry = date_create_from_format("d/m/Y H:i:s", $timeouts[$key]);

            if ($now >= $expiry) {
                return null;
            }
        }

        return isset($cache[$key]) ? $cache[$key] : null;
    }
324833
public function get($key)
    {
        if (!$this->isEnabled()) {
            return null;
        }

        $value = $this->server->get($this->prefix . $key);

        return false === $value ? null : $value;
    }
1015197
public static function pull($key)
    {
        if (isset($_SESSION[self::$prefix . $key])) {
            $value = $_SESSION[self::$prefix . $key];
            unset($_SESSION[self::$prefix . $key]);

            return $value;
        }

        return null;
    }
325999
public function get_variables( $key )
	{
		if ( ! empty( $this->variables[ $key ] ) ) {
			return $this->variables[ $key ];
		} else {
			return null;
		}
	}
135127
public function get($key)
    {
        if ($this->session->has($key)) {
            return $this->session->get($key);
        }
    }
342715
public function get($key, $default = null)
    {
        return isset($_SESSION) && isset($_SESSION[$key])
            ? $_SESSION[$key]
            : $default;
    }
514477
public static function  get($key)
	{
		//check if this key exists 
		$exists = (isset($_SESSION[$key])) ? true : false;

		//return check status if false
		if ( ! $exists)  return $exists;

		//return the session data if found
		else return $_SESSION[$key];

	}
1006092
public function getServerValue($key)
    {
        $key    = strtolower($key);
        $server = $this->getServer();
        $return = null;
        if (isset($server[$key])) {
            $return = $server[$key];
        }
        unset($server);
        return $return;
    }