Creates associations for all keys and corresponding values of either an
array or iterable object.

@param \Traversable|mixed[] $values

@return \PlanB\DS\Map\MapInterface
495611
public function putAll(iterable $values): MapInterface
    {
        foreach ($values as $key => $value) {
            $this->put($key, $value);
        }

        return $this;
    }
93966
public function selected($values)
    {
        if (is_array($values) || $values instanceof Closure) {
            $this->selected = $values;
        }
        else if (func_num_args() > 1) {
            $this->selected = func_get_args();
        } else {
            $this->selected = [$values];
        }

        return $this;
    }
1097186
public function setValuesRaw($values = array())
    {
        foreach ($values as $key => $value) {
            $this->setRaw($key, $value);
        }

        return $this;
    }
67255
public function setDefinedValues(array $values)
    {
        foreach ($this->_definition as $key => $value) {
            $this->setOptionalValueInArray($key, $values);

            if (!array_key_exists($key, $values)) {
                throw new Exception ('Value is missing for "' . $key . '"');
            }

            $this->$key = $values[$key];
        }

        return $this;
    }
710171
public function addValues(array $values)
    {
        foreach ($values as $key => $value) {
            $this->addValue($key, $value);
        }
        return $this;
    }
700381
public function setAll(array $values)
    {
        if ($this->getResource()) {
            if ($this->useLocalResource) {
                $this->localResource = $values;
            } else {
                $GLOBALS[$this->getResource()] = $values;
            }
        }
        return $this;
    }
813610
public function setDataFromArray(array $values = array())
    {
        foreach ($values as $key => $value) {

            $desiredKey = $this->trimPrefixKey($key);

            $propertyName = $this->getPropertyName($desiredKey);
            $setterMethodName = 'set' . ucfirst($propertyName);

            // Direct setter exists into object, just use it
            if (method_exists($this, $setterMethodName) && $value !== null) {
                $this->$setterMethodName($value);
            } elseif ($value !== null) {
                // Otherwise, try to get sub object to set data
                $this->setDataForSubEntitiy($desiredKey, $value);
            }
        }
        return $this;
    }
568028
public static function wrap(array &$values)
    {
        $types = new Dictionary;
        self::determineTypes($values, $types);

        return new TypedDictionary($types, $values);
    }
456736
public function append(iterable $values): self
    {
        foreach ($values as $value) {
            $this->add($value);
        }

        return $this;
    }
746802
public function bind($values = [])
    {
        if (is_object($values)) {
            $values = get_object_vars($values);
        }

        if (!is_array($values)) {
            throw new \InvalidArgumentException('Please give me array or object');
        }

        foreach ($values as $key => $value) {
            $this->$key = $value;
        }

        return $this;
    }
915171
public function values($values)
    {
        if(!$values instanceof KDatabaseQuerySelect)
        {
            if (!$this->columns && !is_numeric(key($values))) {
                $this->columns(array_keys($values));
            }

            $this->values[] = array_values($values);
        }
        else $this->values = $values;

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

        return $this;
    }
251650
public function add($values)
    {
        if (! is_array($values) && ! $values instanceof BaseCollection) {
            $values = func_get_args();
        }

        // Once we have made sure our input is an array of values, we will convert
        // them into value model objects (if no model instances are given). When
        // done we will just push all values into the current collection items.
        foreach ($values as $value) {
            $this->push($this->buildValue($value));
        }

        return $this;
    }
924001
public function filter($values)
    {
        if (is_array($values)) {
            foreach ($values as $key => $value) {
                $values[$key] = $this->filterValue($value);
            }
        }

        return $values;
    }
374566
public function setFieldValues(array $values)
    {
        foreach ($values as $name => $value) {
            $this->setFieldValue($name, $value);
        }
        return $this;
    }
186213
public function toKeyValue(array $values)
    {
        $result = [];

        foreach ($values as $key => $value) {
            if (is_array($value)) {
                $result[$key] = $this->toKeyValue($value);
            } elseif (is_object($value)) {
                $result[$key] = $this->toKeyValue((array) $value);
            } else {
                $result[$key] = $value;
            }
        }

        return $result;
    }
114990
public function appendValues(array $values)
    {
        $appendValues = [];

        foreach ($values as $value) {
            $appendValues[] = $this->formatValue($value);
        }

        $this->message = $this->message . implode(', ', $appendValues);

        return $this;
    }