Get string given values.

@param array $values

@return string
10900
public static function arrayToString(array $values): string
    {
        if (self::ZERO == $values[0]) {
            $values[0] = '';
        }
        if (self::INFINITE == $values[1]) {
            $values[1] = '';
        }

        return implode(self::SEPARATOR, $values);
    }
568072
protected function getArray($values)
    {
        $values = explode(',', $values);

        array_walk($values, function (&$value) {
            $value = trim($value);
        });

        return $values;
    }
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;
    }
119429
public function from_array(array $values)
	{
		foreach($values as $property => $value)
		{
			if (array_key_exists($property, static::properties()) and ! in_array($property, static::primary_key()))
			{
				$this->_data[$property] = $value;
			}
			elseif (array_key_exists($property, static::relations()) and is_array($value))
			{
				$rel = static::relations($property);
				if ( ! isset($this->_data_relations[$property]))
				{
					$this->_data_relations[$property] = $rel->singular ? null : array();
				}
				foreach($value as $id => $data)
				{
					if (is_array($data))
					{
						if (array_key_exists($id, $this->_data_relations[$property]))
						{
							foreach($data as $field => $contents)
							{
								if ($rel->singular)
								{
									$this->_data_relations[$property]->{$field} = $contents;
								}
								else
								{
									$this->_data_relations[$property][$id]->{$field} = $contents;
								}
							}
						}
						else
						{
							if ($rel->singular)
							{
								$this->_data_relations[$property] = call_user_func(static::relations($property)->model_to.'::forge', $data);
							}
							else
							{
								$this->_data_relations[$property][] = call_user_func(static::relations($property)->model_to.'::forge', $data);
							}
						}
					}
				}
			}
			elseif (property_exists($this, '_eav') and ! empty(static::$_eav))
			{
				$this->_set_eav($property, $value);
			}
			else
			{
				$this->_custom_data[$property] = $value;
			}
		}

		return $this;
	}
185493
public function strings($strings = null) {
		if (is_array($strings)) {
			return $this->_strings = $this->_strings + $strings;
		}
		if (is_string($strings)) {
			return isset($this->_strings[$strings]) ? $this->_strings[$strings] : null;
		}
		return $this->_strings;
	}
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;
    }
1039906
public function prepareValues($values)
    {
        if (empty($values)) {
            return [];
        }

        if (!is_array($values)) {
            $values = (array)$values;
        }

        $values = array_filter($values, 'is_scalar');
        $values = array_map('self::quoteValue', $values);

        return $values;
    }
310398
public function getExecutedQueryString(array $values = array())
    {
        $sql = $this->queryString;
        $boundValues = empty($values) ? $this->boundValues : $values;
        $matches = array();
        if (preg_match_all('/(:p[0-9]+\b)/', $sql, $matches)) {
            $size = count($matches[1]);
            for ($i = $size - 1; $i >= 0; $i--) {
                $pos = $matches[1][$i];

                // trimming extra quotes, making sure value is properly quoted afterwards
                $boundValue = $boundValues[$pos];
                if (is_string($boundValue)) { // quoting only needed for string values
                    $boundValue = trim($boundValue, "'");
                    $boundValue = $this->pdo->quote($boundValue);
                }
                $sql = str_replace($pos, $boundValue, $sql);
            }
        }

        return $sql;
    }
47463
protected static function escapeSet(array $values)
    {
        $escaped_values = [];

        foreach ($values as $value) {
            if (is_array($value)) {
                $escaped_values[] =
                    sprintf("(%s)", join(', ', static::escapeSet($value)));
            } else {
                $escaped_values[] = '$*';
            }
        }

        return $escaped_values;
    }
1058123
public function formatURL($values=array()) {
		$params = '';
		if( $values ) {
			// TODO : Process options
// 			foreach( $this->parameters as $key => $arg ) {
// 				$value = isset($values[$key]) ? $values[$key] : null;
// 				$arg = $this->parameters[$key];
// 				if( $arg->verify($value) ) {
// 					$params .= ' '.$arg->getLongCommand($value);
// 				}
// 			}
			$params = implode(' ', $values);
		}
		return static::getRootCommand().' '.$this->getPath().$params;
	}
1113368
public static function values($mask, array $values)
    {
        foreach ($values as $k => $v) {
            $mask = str_replace('{' . $k . '}', $v, $mask);
        }

        return $mask;
    }
1214381
protected function getValues(array $values)
    {
        $array = [];

        $versionedKeys = array_merge(
            $this->model->getVersionedAttributeNames(),
            [$this->model->getLatestVersionColumn(), $this->model->getVersionColumn(), $this->model->getVersionKeyName()]
        );

        foreach ($values as $key => $value) {
            if (! $this->isVersionedKey($key, $versionedKeys)) {
                $array[$key] = $value;
            }
        }

        return $array;
    }
920932
public function transformValues( array $values )
    {
        if ( ! empty( $values['gridguyz-multisite']['defaultDomain'] ) )
        {
            $values['gridguyz-multisite']['defaultDomain'] = trim(
                $values['gridguyz-multisite']['defaultDomain'],
                '.'
            );
        }

        if ( ! empty( $values['gridguyz-multisite']['domainPostfix'] ) )
        {
            $values['gridguyz-multisite']['domainPostfix'] = '.' . trim(
                $values['gridguyz-multisite']['domainPostfix'],
                '.'
            );
        }

        return $values;
    }
1306356
private function getUniqueValueFromArray(array $values)
    {
        $serializedValues = false;
        foreach ($values as $key => $value) {
            if (!\is_array($value)) {
                continue;
            }

            $values[$key] = \serialize($value);

            $serializedValues = true;
        }

        if (!$serializedValues) {
            return 1 === \count(\array_unique($values)) ? $values[0] : null;
        }

        return 1 === \count(\array_unique($values)) ? \unserialize($values[0], ['allowed_classes' => true]) : null;
    }
79559
protected function getChars(array $strings)
	{
		$chars = [];
		foreach ($strings as $k => $string)
		{
			if ($this->isChar($string))
			{
				$chars[$k] = $string[0];
			}
		}

		return $chars;
	}
1307351
public function values(array $values)
    {
        foreach( $values as $k => $v ) {
            $this->value($k, $v);
        }
        return $this;
    }
1134972
public function arrayToMultiselect(array $values)
    {
        // First clean the array
        foreach ($values as $k => $v) {
            if (empty($v)) {
                unset($values[$k]);
            }
        }

        // Encode
        $values = (empty($values) ? '^^' : encodeMultienumValue($values));

        // Then return the array
        return $values;
    }