Creates multiple prefixes queries for the list of keys

Two keys and two values will results in 4 prefix queries

@param array $keys
@param array $values
@param type $bool
@param array $params
@return QueryBuilder|static|self
185660
public function multiPrefixs(array $keys, array $values, $bool = "must", $filter = false, array $params = []) {
        $subQuery = $this->orWhere($bool);
        foreach ($keys as $key) {
            $subQuery->prefixs($key, $values, $bool, true, $params);
        }
        $subQuery->endSubQuery();
        return $this;
    }
782086
public function many(array $keys)
    {
        $results = [];

        $values = $this->connection()->mget(array_map(function ($key) {
            return $this->prefix.$key;
        }, $keys));

        foreach ($values as $index => $value) {
            $results[$keys[$index]] = ! is_null($value) ? $this->unserialize($value) : null;
        }

        return $results;
    }
1243841
public function add(array $params) {
        foreach ($params as $key => $value) {
            $this->set($key, $value);
        }

        return $this;
    }
969875
protected function processCondition($conditions, $params, $types)
    {
        // Regard numeric and null as primary key value
        if (is_numeric($conditions) || empty($conditions)) {
            $conditions = array($this->primaryKey => $conditions);
        }

        if (is_array($conditions)) {
            $where = array();
            $params = array();
            foreach ($conditions as $field => $condition) {
                if (is_array($condition)) {
                    $where[] = $field . ' IN (' . implode(', ', array_pad(array(), count($condition), '?')) . ')';
                    $params = array_merge($params, $condition);
                } else {
                    $where[] = $field . " = ?";
                    $params[] = $condition;
                }
            }
            $conditions = implode(' AND ', $where);
        }

        if ($params !== false) {
            if (is_array($params)) {
                $this->params = array_merge($this->params, $params);
                $this->paramTypes = array_merge($this->paramTypes, $types);
            } else {
                $this->params[] = $params;
                if ($types) {
                    $this->paramTypes[] = $types;
                }
            }
        }

        return $conditions;
    }
658504
protected function prepareParams(array $params)
    {
        foreach ($params as $key => $param) {
            if (gettype($param) === 'boolean') {
                $params[$key] = (string)(($param) ? 'true' : 'false');
            }
        }
        return $params;
    }
31784
public function prepareArrayQuery(string $param_prefix = 'prm', array $values = []): array
    {
        $params_names = [];
        $params_val = [];
        
        foreach ($values as $key => $val) {
            $name = ':' . $param_prefix . $key;
            $params_names[] = $name;
            $params_val[$name] = $val;
        }
        
        return [
            'sql' => implode(', ', $params_names),
            'values' => $params_val
        ];
    }
1307351
public function values(array $values)
    {
        foreach( $values as $k => $v ) {
            $this->value($k, $v);
        }
        return $this;
    }
131288
public function mapCombine( $keys, $values )
    {
        return array_combine(
            array_map( $keys, $this->collection ),
            array_map( $values, $this->collection )
        );
    }
244973
public function query(array $params = []) {
        $this->params = array_merge($this->params, $params);
        return $this->db->query($this->sql, $this->params);
    }
158640
static public function fromArrays(array $keys, array $values) {
    if (count($keys) !== count($values)) {
      throw new SimpleOrderedMapException(
        'Length of keys and values does not match');
    }
    $map = new SimpleOrderedMap();
    $map->keys = array_values($keys);
    $map->values = array_values($values);
    return $map;
  }
1087678
public function replaceKeys(array $keys): self
    {
        $values = \array_values($this->getArray());
        $result = \array_combine($keys, $values);

        return static::create(
            $result,
            $this->iteratorClass,
            false
        );
    }
630674
public function values(array $values)
    {
        $this->sqlParts['values'] = is_array(current($values)) ? $values : [$values];

        return $this;
    }
1278797
public function whereNotIn(string $key, array $values): QueryBuilder
    {
        $this->addWhere($key, 'NOT IN', $values, 'AND');
        return $this;
    }
1093076
public function many(array $keys)
    {
        $return = [];

        $prefixedKeys = array_map(function ($key) {
            return $this->prefix . $key;
        }, $keys);

        $values = $this->connection()->mGet($prefixedKeys);

        foreach ($values as $index => $value) {
            $return[$keys[$index]] = is_numeric($value) ? $value : unserialize($value);
        }

        return $return;
    }
1331672
public function merge( array $values, array $allowedKeys = [] )
    {
        $this->data = array_merge(
            $this->data,
            array_only( $values, array_merge(array_keys( $this->data ), $allowedKeys) )
        );

        $this->persist();

        return $this;
    }
888243
public function addKeys($keys) {
		foreach ((array)$keys as $position => $key) {
			$this->keys[$position] = $key;
		}
		return $this;
	}
600739
public function combine(array $keys = null, array $values = null)
	{
		return array_combine($keys ?: $this->members, $values ?: $this->members);
	}