Returns the data associated with the given key.

@param string $key An identifier for the content stored in the session.
@return mixed The contents associated with the given key
@throws Exception\SessionNotStartedException
966520
public function getData($key)
    {
        if ($this->started !== true) {
            throw new Exception\SessionNotStartedException('Tried to get session data, but the session has not been started yet.', 1351162255);
        }
        return $this->storageCache->get($this->storageIdentifier . md5($key));
    }
617668
public function read($key) {
        return isset($_SESSION[$this->prefix . $key]) ? $_SESSION[$this->prefix . $key] : null;
    }
926572
public function get($key)
    {
        $this->assertOpened();
        $key = (string) $key;
        if (isset($this->contents[$key])) {
            return $this->contents[$key];
        }
        return null;
    }
563088
public static function get($key)
    {
        if (isset($_SESSION[$key]) === false) {
            return null;
        }

        return unserialize($_SESSION[$key]);
    }
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;
	}
905196
public function get($key)
    {
        $key = $this->salted($key, $this->suffix);

        $raw = $this->predis->get($key);

        // every response should be a php serialized string.
        // values not matching this pattern will explode.
        // missing data should return null, which is not unserialized.

        if (is_string($raw)) {
            return unserialize($raw);
        }

        return $raw;
    }
1365828
protected function getValue($key)
    {
        if (!array_key_exists($key, $this->store)) {
            throw new KeyNotFoundException();
        }

        $getResult = $this->store[$key];
        $unserialized = @unserialize($getResult);

        if (Util::hasInternalExpireTime($unserialized)) {
            $this->handleTtl($key, $unserialized['ts'], $unserialized['s']);

            $getResult = $unserialized['v'];
        }

        return $getResult;
    }
1317806
public static function get($key)
		{
			self::_cleanPrevious();

			if(!isset($_SESSION[self::$_sessionKey.$key]) && self::$_defaultReturn=="ST__EXCEPTION")
			{
				throw new \Exception("Message with key: ".$key." doesn't exist",404);
			}

			$message = isset($_SESSION[self::$_sessionKey.$key]) ? $_SESSION[self::$_sessionKey.$key] : null;
			if(isset($message[2]['readOnce']) && $message[2]['readOnce'])
			{
				self::remove($key);
			}

			return $message ? $message[1] : self::$_defaultReturn;
		}
81629
public function retrieve($key)
    {
//        if (!is_array($key)) {
//            return;
//        }
        list($name, $userId) = explode('/user-', $key);

        if (!isset($this->userMeta[$userId])) {
            $data = $this->getModel()->where('user_id', '=', $userId)->get();

            $this->userMeta[$userId] = $this->processRetrievedData($userId, $data);
        }

        return Arr::get($this->userMeta, "{$userId}.{$name}");
    }
1246071
private function getSession($key)
    {
        return isset($this->collection[$this->id][$key]) ? $this->collection[$this->id][$key] : null;
    }
1345319
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!$this->requestDataHasBeenRetrieved) {
            $this->retrieveRequestData();
        }
        if (!isset($this->cachedRequestData[$key])) {
            return null;
        }

        return $this->cachedRequestData[$key];
    }
1049638
public function get($key)
    {
        if (!$this->has($key)) {
            throw new Exception(sprintf(Exception::SETTING_KEY_NOT_EXISTS, $key));
        }

        return $this->getCachedSettings()->offsetGet($key);
    }
388649
public function get( $key )
	{
		if( empty( $key ) )																		//  no Key given
			throw new InvalidArgumentException( 'Key must not be empty.' );						//  throw Exception
		if( isset( $this->pairs[$key] ) )														//  Key is set on its own
			return $this->pairs[$key];															//  return Value
		else																					//  Key has not been found
		{
			$key		.= ".";																	//  prepare Prefix Key to seach for
			$list		= array();																//  define empty Map
			$length		= strlen( $key );														//  get Length of Prefix Key outside the Loop
			foreach( $this->pairs as $pairKey => $pairValue )									//  iterate all stores Pairs
			{
				if( $pairKey[0] !== $key[0] )													//  precheck for Performance
				{
					if( count( $list ) )														//  Pairs with Prefix Keys are passed
						return $list;															//  break Loop -> big Performance Boost
					continue;																	//  skip Pair
				}
				if( strpos( $pairKey, $key ) === 0 )											//  Prefix Key is found
					$list[substr( $pairKey, $length )]	= $pairValue;							//  collect Pair
			}
			if( count( $list ) )																//  found Pairs
				return $list;																	//  return Pair Map
		}
		return NULL;																			//  nothing found
	}
655476
public function read($key)
    {
        $key = strval($key);
        $val = null;

        if(strlen($key) == 0)
        {
            return $val;
        }

        $this->openSession();

        if(isset($_SESSION[$key]) == true)
        {
            $val = $_SESSION[$key];
        }

        $this->closeSession();

        return $val;
    }
850702
public function getData($key = null)
    {
        if (!$key) {
            return $this->data;
        } else if ($this->hasKey($key)) {
            return $this->data[$key] ?? null;
        }

        return null;
    }
1278768
public static function &get($key)
    {
        self::startIf();
        if (isset($_SESSION[$key])) {
            return $_SESSION[$key];
        } else {
            $val = null;
            return $val;
        }
    }
522259
public function get($key)
    {
        $filePath = $this->storageFolder . $key;
        if (file_exists($filePath)) {
            return file_get_contents($filePath);
        }

        return null;
    }