Does the session have a value for the key(s)?


@param string|array $k The key(s) to check for in the session.

@return boolean Whether the key is in the session.
349852
public function in($k){

        if(is_array($k) && count(array_intersect(array_keys($_SESSION),$k))>0){
            return true;
        }//if

        return isset($_SESSION[$k]);

    }
1079463
public function key($name = 'session_id')
	{
		return isset($this->keys[$name]) ? $this->keys[$name] : false;
	}
725665
public static function set($key, $value = false)
    {
        if (is_array($key) && $value == false) {
            foreach ($key as $name => $value) {
                $_SESSION[self::$prefix . $name] = $value;
            }
        } else {
            $_SESSION[self::$prefix . $key] = $value;
        }

        return true;
    }
571166
public function has($key)
    {
        return isset($this->data[$key]) || isset($this->session[$key]);
    }
1237118
private function has($key) {
		return isset($_SESSION[self::SESSION_KEY_FLASH]) && isset($_SESSION[self::SESSION_KEY_FLASH][$key]);
	}
1308580
public function isFirst($key)
	{
		if ($this->rows && $this->count())
		{
			return $key == array_slice($this->rows, 0, 1)[0]->getPkValue();
		}

		return false;
	}
1179362
public function has($key)
    {
        $keys = explode('.', $key);
        $cKeys = count($keys);
        $config = $this->_arr;

        for ($i = 0; $i < $cKeys; ++$i) {
            if (is_array($config)) {
                if (array_key_exists($keys[$i], $config)) {
                    $config = $config[$keys[$i]];
                } else {
                    return false;
                }
            } else {
                return false;
            }
        }

        return true;
    }
233023
public function has( $key = null )
	{
		$keys = is_array( $key ) ? $key : func_get_args();

		foreach ( $keys as $key )
		{
			if ( $this->first( $key ) === '' )
			{
				return false;
			}
		}

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

        $value = $this->memcacheObj->get($key);
        
        if (!$value) {
            return false;
        } else {
            return true;
        }
    }
841473
protected function isIn($key, array $session)
    {
        if (array_key_exists($key, $session) && $session[$key] !== null) {
            return $session[$key];
        }

        return null;
    }
1325025
public function has($key, $value = null)
    {
        if (is_null($value)) {
            return isset($_SESSION[$key]) ? true : false;
        } else {
            return isset($_SESSION[$key]) && $_SESSION[$key] == $value ? true : false;
        }
    }
1088173
public function has($key)
    {
        $keys = (func_num_args() > 1) ? func_get_args() : (array) $key;

        foreach ($keys as $key) {
            if(!array_key_exists($key, $_SESSION))
                return false;
        }

        return true;
    }
288391
public function has(string $key){
        $data   = $this->status() === self::ACTIVE
            ? $_SESSION : $this->finishedData;
        
        return array_key_exists($key, $data);
    }
893860
public function has(Request $request, string $key): bool
    {
        $exists = $this->getSession($request)->has($key);

        $this->logger->info('session: has key {key}, exists {exists}', ['key' => $key, 'exists' => $exists]);

        return $exists;
    }
765563
public function assertSessionMissing($key)
    {
        if (is_array($key)) {
            foreach ($key as $k) {
                $this->assertSessionMissing($k);
            }
        } else {
            PHPUnit::assertFalse($this->app['session.store']->has($key), "Session has unexpected key: $key");
        }
    }
1198222
protected function isPk($key)
    {
        $pk = $this->getPk();
        if (is_string($pk) && $pk == $key) {
            return true;
        } elseif (is_array($pk) && in_array($key, $pk)) {
            return true;
        }

        return false;
    }
429366
public function check($k,$v)
    {
      $this->get($this->id);

      if ($this->$k == $v)
      return TRUE;

      return FALSE;
    }