Determines if the specified key exists in the current session. Optionally,
if the value argument is used, it also validates that the value is exactly
the one provided.

@param string $key
@param mixed $value
@return bool
438013
public function has(string $key, $value = null): bool
    {
        return is_null($value)
            ? isset($_SESSION[$key])
            : isset($_SESSION[$key]) && $_SESSION[$key] == $value;
    }
111239
public function hasPermission($key, $value)
    {
        $values = explode(',', $this->getPermission($key));

        return in_array($value, $values);
    }
1285591
public function set($key, $value)
    {
        if (!$key) {
            throw new \InvalidArgumentException('Missing Key in Session Set Method');
        }
        $this->sessionData[$key] = $value;

        return $this;
    }
1322623
protected function isIn($key, $value) : bool
    {
        $data = explode(',', $value);
        if (is_array($data) && in_array((string) $this->param[$key], $data)) {
            return true;
        }

        $this->errors[$key.self::ERROR] = $this->convertToFieldName($key)." must be in the given list of values $value.";
        return false;
    }
1151431
public static function setState($key, $value)
	{
		$session  = self::$app->get('session');
		$registry = $session->get('registry');

		if (!is_null($registry))
		{
			return $registry->set($key, $value);
		}

		return null;
	}
13512
public function exists(string $key): bool
    {
        $result = $this->execute([
            [
                'command' => 'get',
                'key' => $key,
                'result' => ['key']
            ]
        ]);
        return isset($result[0]['key']);
    }
369688
public function hasFilter($key, $value=null)
    {
        $this->parseInputOnce();

        if (!array_key_exists($key, $this->filters)) {
            return false;
        }

        if (func_num_args() < 2) {
            return true;
        }

        return $this->filterWouldMatch($this->filters[$key], $value, $key);
    }
16434
public function keyExists($key)
    {
        $exists = true;
        try {
            $this->get($key);
        } catch (Exception $e) {
            $exists = false;
        }
        return $exists;
    }
192003
public static function exists(string $input, string $key) : bool
    {
        return isset(self::getVariable($input, null)[$key]);
    }
741777
public function session($value)
    {
        if (!isset($this->session[$value])) {
            return false;
        } else {
            return $this->session[$value];
        }
    }
1032045
public function exists( $key ) {
		if ( ! $this->is_valid_session() ) {
			return false;
		}

		$key = $this->get_session_key( $key );
		if ( ! array_key_exists( $key, $_SESSION ) ) {
			return false;
		}

		return ! $this->_expired( $_SESSION[ $key ] );
	}
1308564
public function search($key, $value)
	{
		foreach ($this->rows as $row)
		{
			if ($row->$key == $value)
			{
				return true;
			}
		}

		return false;
	}
1030154
public function set($key, $value = null)
    {
        if (!GC_CLI && isset($_SESSION)) {
            gplcart_array_set($_SESSION, $key, $value);
            return true;
        }

        return false;
    }
1130787
public function has($key)
    {
        $key = $this->getKeyCode($key);

        $value = $this->memcacheObj->get($key);
        
        if (!$value) {
            return false;
        } else {
            return true;
        }
    }
534337
protected function checkValue($value, $key = null)
    {
        if ($value != null) {
            if ($key !== null) {
                return isset($value[$key]) ? $value[$key] : null;
            }

            return $value;
        }
    }
684459
public function exists($key) {
		return isset($this->_data[$key]) || isset($this->registered[$key]);
	}
288391
public function has(string $key){
        $data   = $this->status() === self::ACTIVE
            ? $_SESSION : $this->finishedData;
        
        return array_key_exists($key, $data);
    }