Filter items by the given key value pair.

@param  string  $key
@param  mixed  $values
@param  bool  $strict
@return static
330120
public function whereNotIn($key, $values, $strict = false)
    {
        $values = $this->getArrayableItems($values);

        return $this->reject(function ($item) use ($key, $values, $strict) {
            return \in_array(Helper::data_get($item, $key), $values, $strict);
        });
    }
895909
public function contains($value, $key = null, $strict = false)
    {
        if ($key !== null) {
            foreach ($this->items as $item) {
                $v = isset($item[$key]) ? $item[$key] : null;
                if ((!$strict && $v == $value) || $v === $value) {
                    return true;
                }
            }
            return false;
        }

        if ($this->useAsCallable($value)) {
            return $this->first($value) !== null;
        }

        return in_array($value, $this->items, $strict);
    }
132321
public function keys($search = null, $strict = null)
    {
        if (null === $search && null === $strict) {
            $keys = \array_keys($this->items);
        } elseif (null !== $search && null === $strict) {
            $keys = \array_keys($this->items, $search);
        } else {
            $keys = \array_keys($this->items, $search, $strict);
        }

        return new static($keys);
    }
309842
public function whereIn($key,$values=array())
    {
        $dstore= new DataStore;
        $dstore->meta($this->metaData);
        foreach ($this->rows as $row) {
            if (in_array($row[$key], $values)) {
                $dstore->append($row);
            }
        }
        return $dstore;
    }
419113
public function search($needle, $strict = false)
    {
        return Arr::search($this->items, $needle, $strict);
    }
137032
public function clearFilter($key=null)
    {
        if (!$key) {
            $this->filters = [];
            return $this;
        }

        if (isset($this->filters[$key])) {
            unset($this->filters[$key]);
        }

        return $this;
    }
990169
public static function every(array &$arr, $value, $strict = true)
    {
        $filter = function ($v) use ($value, $strict) {
            return $strict ? $v === $value : $v == $value;
        };

        return count(array_filter($arr, $filter)) === count($arr);
    }
338689
public function get($key, $strict = true, $default = null) {
        $value = $this->memcached->get($key);
        $resultCode = $this->memcached->getResultCode();
        if ($resultCode == \Memcached::RES_SUCCESS) {
            return $value;
        }
        if (\Memcached::RES_NOTFOUND == $resultCode) {
            if ($strict) {
                throw new CacheMissException($key);
            }
            return $default;
        }
        throw new \Exception('Memcached failed with result code ' . $resultCode);
    }
988705
public static function inArray($needle, $haystack, $strict = NULL)
	{
		return static::is_array($haystack) && in_array($needle, $haystack, $strict);
	}
948675
public function where($property, $value, $strict = true)
    {
        return $this->filter(function ($object) use ($property, $value, $strict) {

            if (!array_key_exists($property, $object->settings)) {
                return false;
            }

            return $strict
                ? $object->settings[$property] === $value
                : $object->settings[$property] == $value;
        });
    }
1157803
public function isOneOf(array $allowedValues, bool $strict = false): bool
    {
        if (!is_array($this->value)) {
            return in_array($this->value, $allowedValues, $strict);
        }

        foreach ($this->value as $value) {
            if (!in_array($value, $allowedValues, $strict)) {
                return false;
            }
        }

        return true;
    }
505479
public function contains($value, $strict = TRUE)
    {
        return $this->containsIn($value, $strict, $this->all());
    }
234167
protected function filter_by_key( $values ) {

		if ( count( $this->filters_by_key ) < 1 ) {

			return $values;
		}

		foreach ( $values as $key => $value ) {
			if ( ! is_scalar( $value ) || ! isset( $this->filters_by_key[ $key ] ) ) {
				continue;
			}
			/** @var FilterInterface[] */
			$filters = $this->filters_by_key[ $key ];
			foreach ( $filters as $filter ) {
				$values[ $key ] = $filter->filter( $value );
			}
		}

		return $values;
	}
608273
public function deleteByValue($value, bool $strict = true) : void
    {
        foreach($this->_data as $data) {
            $exists = ($strict) ? ($data === $value)
                                : ($data == $value);

            if($exists) {
                unset($this->_data[$value]);
            }
        }
    }
416494
public function matches($value, $strict = true)
    {
        return $strict ? $this->value === $value : $this->value == $value;
    }
546387
public static function removeVal(&$haystack, $needle, $strict = true)
    {
        $count = 0;
        if (\is_array($haystack)) {
            // PHP 4 doesn't have 3rd array_keys() param -> perform strict check in loop
            $keys = \array_keys($haystack, $needle);
            foreach ($keys as $k) {
                if ($strict && $haystack[$k] !== $needle) {
                    continue;
                }
                unset($haystack[$k]);
                $count++;
            }
        }
        return $count;
    }
377880
function keysOf ($value, $strict = true)
  {
    $this->A = array_keys ($this->A, $value, $strict);
    return $this;
  }