Adds Keys to search for.
@access		public
@param		array		$keys			Keys to search for
@return		void
355660
public function addKeys( $keys )
	{
		if( !is_array( $keys ) )
			throw new InvalidArgumentException( 'An Array should be given.' );
		foreach( $keys as $key )
			$this->addKey( $key );
	}
193629
public function has_all(array $keys) {
        foreach ($keys as $key) {
            if (!$this->has($key)) {
                return false;
            }
        }
        return true;
    }
715256
public function hasAny($keys = [])
    {
        if ($this->isEmpty()) {
            return false;
        }

        $keys = is_array($keys) ? $keys : func_get_args();

        foreach ($keys as $key) {
            if ($this->has($key)) {
                return true;
            }
        }

        return false;
    }
942779
public static function keysExist ($array, $keys)
		{
			if (!is_array($array))
				return null;

			if (!is_array($keys))
				$keys = [ $keys ];

			foreach ($keys as $key)
				if (!array_key_exists($key, $array))
					return false;

			return true;
		}
1304504
public function findByKeys(array $keys)
    {
        $result = [];
        /** @var Cursor $list */
        $list = $this->collection->find(['_id' => ['$in' => $keys]]);

        foreach ($list as $document) {
            $result[] = $this->hydrateEntity($document);
        }

        return $result;
    }
1199619
public function hasKeys(array $keys): array
    {
        $list = [];
        foreach ($keys as $key) {
            $list[$key] = $this->hasKey((string)$key);
        }

        return $list;
    }
216478
private function validateKeys(array $keys)
    {
        foreach ($keys as $key) {
            $key = (string)$key;
            $this->validateKey($key);
        }
    }
1273690
private function iteratorFromKeys(array $keys)
    {
        $values = [];
        $key    = ($this->request->qtype === 'eq')
            ? $this->request->key
            : null;

        foreach ($keys as $value) {
            $entry = new IndexEntry();

            $entry->indexKey  = $key;
            $entry->objectKey = $value;

            $values[] = $entry;
        }

        return new ArrayIterator($values);
    }
465774
public function deleteMulti(array $keys): void
    {
        if ($this->enabled === false) {
            return;
        }

        foreach ($keys as $index) {
            if ($key = $this->cacheIndex[$index] ?? null) {
                unset($this->cacheIndex[$index]);
            } else {
                $key = $index;
            }

            unset($this->cache[$key], $this->cacheExpiryTime[$key], $this->cacheAccessCount[$key]);
        }
    }
1287304
public function select(array $keys)
    {
        $list = [];
        foreach ($keys as $key) {
            if (isset($this->entries[$key])) {
                $list[$key] = $this->entries[$key];
            }
        }

        return $this->createFrom($list);
    }
200694
protected function add(array $items)
    {
        array_walk($items, function ($value, string $key) {
            add_theme_support($key, $value);
        });
    }
890896
protected function ensureValidKeys($keys)
    {
        if (!is_array($keys) && !($keys instanceof \Traversable)) {
            throw new InvalidArgumentException('A cache key set must be either an array or a Traversable.');
        }

        foreach ($keys as $key) {
            $this->ensureValidKey($key);
        }
    }
691007
public function clear($keys = null)
    {
        if (is_null($keys)) {
            $this->items = [];

            return;
        }

        $keys = (array) $keys;

        foreach ($keys as $key) {
            $this->set($key, []);
        }
    }
241170
private function filterByKeys(array $keys)
    {
        $results = [];

        foreach ($this->items as $key => $value) {
            if (!in_array($key, $keys)) {
                continue;
            }

            $results[$key] = $value;
        }

        return $results;
    }
594783
public function searchable(array $attributes, string $key = 'q'): void
    {
        $model = $this->resolveQueryBuilderFromModel($this->model);
        $request = $this->app->make('request');
        $value = $request->input($key);

        $request->merge(["{$key}" => \rawurlencode($value)]);

        $this->set('search', [
            'attributes' => $attributes,
            'key' => $key,
            'value' => $value,
        ]);

        $this->model = $this->setupWildcardQueryFilter($model, $value, $attributes);
    }
738808
public function isIndex(array $keys)
    {
        if ($this->indices) {
            foreach ($this->indices as $index) {
                if (count($keys) === count($index->getColumns())) {
                    $allAvailable = true;
                    foreach ($keys as $key) {
                        if (!$index->hasColumn($key instanceof Column ? $key->getName() : $key)) {
                            $allAvailable = false;
                            break;
                        }
                    }
                    if ($allAvailable) {
                        return true;
                    }
                }
            }
        }

        return false;
    }
1368227
public function hasAny($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        $input = $this->all();

        foreach ($keys as $key) {
            if (Arr::has($input, $key)) {
                return true;
            }
        }

        return false;
    }