Checks to see if a key is in the bag.

@param string $key

@return bool
484740
public function contains( $key )
    {
        if ( $key instanceof Interfaces\SeedLike )
        {
            $key = $key->getId();
        }

        return Utility\Option::contains( $this->_bag, $key );
    }
1024320
public function has($key = '')
    {
        try {
            if ($this->cacheInstance !== NULL && is_object($this->cacheInstance)) {
                /**
                 * @var $cache object
                 */
                $cache = $this->cacheInstance->getItem($key);
                if (!$cache->isHit()) {
                    return FALSE;
                } else {
                    return TRUE;
                }
            } else {
                $this->debug->error(__FUNCTION__, 'Unavailable cacheInstance');

                return FALSE;
            }
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return $message;
        }
    }
230605
public function containsKey($key): bool {
        $node = $this->getHead();
        while (null !== $node) {
            if (Comparator::equals($node->getKey(), $key)) {
                return true;
            }
            $node = $node->getNext();
        }
        return false;
    }
1075553
public function has($key): bool
    {
        $this->checkKey($key);
        return (bool) $this->getRedis()->keys($this->filterKey($key));
    }
551349
public function has(?string $key) : bool
    {
        return $key === null ? false : isset($this->themes[$key]);
    }
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;
    }
1014542
public function has($key)
    {
        if ($key == 'message') {
            return !empty($this->message);
        }

        if ($key == 'exception') {
            return !is_null($this->exception);
        }

        return array_key_exists($key, $this->payload);
    }
720766
public function has($key)
    {
        // For performance, we can use isset,
        // but it will not match if value == 0
        return isset($this->values[$key]) || array_key_exists($key, $this->values);
    }
1220614
public function filled($key): bool
    {
        return $this->has($key) && !empty($this->get($key));
    }
204401
protected function isAllowedKey($key): bool
    {
        return empty($this->allowedKeys) || \in_array($key, $this->allowedKeys, true);
    }
743996
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $has_key = false;

        $fetchMethod = $this->apcFuncPrefix.'_fetch';
        $fetchMethod($this->key($key), $has_key);

        // $this->Logger->debug("Cache contains {$key}? " . (($has_key) ? 'TRUE' : 'FALSE'));

        return $has_key;
    }
1213686
public function has($key) {
        $filename = $key.'.cache';
        $maxtime = cache::now() - $this->definition->get_ttl();
        if ($this->prescan) {
            return array_key_exists($filename, $this->keys) && $this->keys[$filename] >= $maxtime;
        }
        $file = $this->file_path_for_key($key);
        return (file_exists($file) && ($this->definition->get_ttl() == 0 || filemtime($file) >= $maxtime));
    }
432982
public function has($key)
    {
        return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) {
            return is_null($this->get($key));
        });
    }
449652
public final function hasItem($key)
   {
       if (!preg_match("/^([A-Za-z0-9_\.]{1,64})$/", $key)) {
           throw new InvalidArgumentException("Invalid key: \"" . $key . "\"");
       }
       return array_key_exists($key, $this->pool);
   }
1249577
public function has(string $key): bool
    {
        return isset($this->data[ $key ]) && !empty($this->data[ $key ]);
    }
640656
public function has(string $key): bool
    {
        return !empty(Helper::arrayGet($this->data, $key));
    }
76220
public function has($key)
	{
		return $this->engine->get($this->id($key)) !== false || $this->engine->getResultCode() != \Memcached::RES_NOTFOUND;
	}