Fetch Item with key equal to value

@param   $key    Object Key
@param   $value  Object Value
@return  mixed
13682
public function fetch($key, $value)
	{
		foreach ($this->_data as $data)
		{
			if ($data->get($key) == $value)
			{
				return $data;
			}
		}
		return null;
	}
1022838
public function pluck($value, $key = null)
    {
        $this->newQuery();

        $lists = $this->query->pluck($value, $key);

        if (is_array($lists)) {
            return $lists;
        }

        return $lists->all();
    }
922830
public function contains($key, $value)
    {
        return \in_array($value, $this->get($key, null, false));
    }
880689
private function item($key, $value): ?array
    {
        // 键不是整数,有用,需要分析
        if (!is_numeric($key)) {
            return $this->itemWithKey(trim($key), $value);
        }

        //键是整数,无用
        return $this->itemWithoutKey($value);
    }
835235
public function pluck($value, $key = null)
    {
        return new static(Arr::pluck($this->items, $value, $key));
    }
1078999
public function get($key, $value = null)
    {
        return $this->envBag->key($key, $value, true);
    }
861676
public function pluck($value, $key = null)
    {
        return new static(ArrayHelper::pluck($this->items, $value, $key));
    }
1166679
public function get($key)
	{
		$success = false;
		$value = apc_fetch($key, $success);
		$item = new Item($key);

		if ($success)
		{
			$item->setValue($value);
		}

		return $item;
	}
883196
public function set($key, $value)
    {
        list($baseKey, $searchKey) = $this->fetchKey($key);

        $registry = $this->get($baseKey);

        if ($registry === null) {
            $registry = $this->cache->get($baseKey);
        }

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

        if ($baseKey != $searchKey)
        {
            $object = array();
            $level  = '';
            $keys   = explode('.', $searchKey);

            foreach ($keys as $key)
            {
                $level .= '.'.$key;
                (trim($level, '.') == $searchKey) ? array_set($object, trim($level, '.'), $value) : array_set($object, trim($level, '.'), array());
            }

            $this->database->table($this->config['table'])->insert(array('key' => $baseKey, 'value' => json_encode($object)));

            // Add to cache
            $this->cache->add($baseKey, $object);
        }
        else
        {
            $this->database->table($this->config['table'])->insert(array('key' => $baseKey, 'value' => json_encode($value)));

            // Add to cache
            $this->cache->add($baseKey, $value);
        }

        return true;
    }
1228201
public function search(string $key, string $value)
    {
        return $this->getRepository()->findBy(['key' => $key, 'value' => $value]);
    }
974526
public function get(string $key, $value = null)
    {
        if ($this->__isset($key)) {
            $value = $this->options[$key];
        }

        return $value;
    }
671385
protected function fetch($value)
    {
        if (empty($value)) {
            if (true === $this->null) {
                return;
            }
            throw new Exception('Value in fetch method of PrimaryKeyField cannot be empty');
        }

        return $this->fetchModel($value);
    }
164169
public function get($key, $value = null)
    {
        return $this->queryBag->key($key, $value, true);
    }
74619
protected function getBy($key, $value)
    {
        $stmt = $this->pdo->prepare('SELECT * FROM ' . $this->tableName . ' WHERE ' . $key . ' = :value');
        $result = $stmt->execute(['value'=>$value]);
        return $this->processRow($stmt->fetch(PDO::FETCH_ASSOC));
    }
1219778
public function with($key, $value = null)
    {
        $values = (is_array($key) || $key instanceof Traversable) ? $key : [$key => $value];

        return $this->copy()->update($values);
    }
34040
public function where($key, $value)
    {
        return collect($this->all()->where($key, $value)->first());
    }
966434
final public function fetchOneColumn($column, $key, $value)
    {
        $this->validateShortcutData();

        return $this->db->select($column)
                        ->from(static::getTableName())
                        ->whereEquals($key, $value)
                        ->query($column);
    }