@param int[] $values

@return Tuple
354351
public static function idParamTuple(array $values) : Tuple
    {
        $type = Integer::normal()->nullable();
        $uniqueIds = [];

        foreach ($values as $value) {
            if (!isset($uniqueIds[$value])) {
                $uniqueIds[$value] = new Parameter($type, $value);
            }
        }

        return self::tuple(array_values($uniqueIds));
    }
476566
protected function setForeignKeys(array $values)
    {
        foreach ($values as $key => &$value) {
            if ($this->endsWith($key, '_id') && !is_int($value)) {
                list($table, $label) = $this->parseRecordLabel($value);
                $value = $this->generateKey($label, $table);
            }
        }

        return $values;
    }
865091
public function setValues(array $values = [])
    {
        $this->values = array_map(function($value) {
            // We need to make sure all values given to a batch modification are
            // strings, otherwise we'll receive an LDAP exception when
            // we try to process the modification.
            return (string) $value;
        }, $values);

        return $this;
    }
596098
public function setMultiple(array $values)
    {
        foreach ($values as $column => $value) {
            $this->set($column, $value);
        }

        return $this;
    }
1344138
private function transfromArray($values)
    {
        if (count($values) > 1) {
            $encoded = array();
            foreach ($values as $value) {
                $encoded[] = $this->encodeValue($value);
            }
            return $encoded;
        } else {
            return $this->encodeValue(reset($values));
        }
    }
291995
public function getIndicesForValues(array $values)
    {
        $indices = array();

        foreach ($values as $i => $givenValue) {
            foreach ($this->values as $j => $value) {
                if ($value === $givenValue) {
                    $indices[$i] = $j;
                    unset($values[$i]);

                    if (0 === count($values)) {
                        break 2;
                    }
                }
            }
        }

        return $indices;
    }
849531
protected function packValues(iterable $values): array
    {
        $packed = [];

        foreach ($values as $key => $value) {
            $this->assertKey(is_int($key) ? (string)$key : $key);
            $packed[$key] = $this->pack($value);
        }

        return $packed;
    }
1085203
public function setValues(array $values = array())
    {
        foreach ($values as $k => $v) {
            $this->set($k, $v);
        }

        return $this;
    }
381291
public function valuesArray($values) {
		if ($values instanceof \ArrayObject)
			$this->value = $values->getArrayCopy();
		elseif (is_object($values))
			$this->value = get_object_vars($values);
		elseif (is_array($values))
			$this->value = $values;
		else
			throw new \InvalidArgumentException("Method 'valuesArray' expected an object or array value");
		
		if (is_numeric(key($this->value))) {
			$this->valueList = $this->value;
			$this->value = null;
		}
		
		return $this;
	}
1082825
public function setAllValues(array $values)
    {
        foreach ($values as $key => $value) {
            $this->$key = $value;
        }

        return $this;
    }
308147
public function pullAll(array $values)
    {
        $this->requiresCurrentField();
        $this->newObj['$pullAll'][$this->currentField] = $values;
        return $this;
    }
143957
public static function instance(array $values = [])
    {
        if (!self::$instance) {
            self::$instance = static::load($values);
        } elseif ($values) {
            $instance = self::$instance;
            foreach ($values as $key => $value) {
                $instance->offsetSet($key, $value);
            }
        }

        return self::$instance;
    }
213847
public function addValues(array $values)
    {
        $valueReferences = [];

        foreach ($values as $value) {
            $valueReferences[] = $this->getReferences()->createReference($value);
        }

        $this->values[] = $valueReferences;

        return $this;
    }
203930
public function whereKeys(array $values)
    {
        $repo = $this->getRepo();

        $this->select->whereIn("{$repo->getTable()}.{$repo->getPrimaryKey()}", $values);

        return $this;
    }
148342
public function setValues($values) {

		if(false === is_array($values)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($values)), E_USER_ERROR);
		}

		$this -> values = $values;

		return $this;
	}
908524
public static function flatten(array $values)
    {
        $results = [];

        array_walk_recursive(
            $values,
            function($value) use (&$results) {
                $results[] = $value;
            }
        );

        return $results;
    }
463347
public function in(array $values)
    {
        foreach ($values as $value) {
            if (\is_array($value)) {
                $this->in($value);
            } else {
                $this->is($value);
            }
        }

        return $this;
    }