Takes parameters and returns an array of the values.

@param string|array $data One or more values to read and put into the return array.

@return array
326654
public static function createArray( $data )
    {
        $_result = array();
        $_count = func_num_args();

        for ( $_i = 0; $_i < $_count; $_i++ )
        {
            //	Any other columns to touch?
            if ( null !== ( $_arg = func_get_arg( $_i ) ) )
            {
                if ( !is_array( $_arg ) )
                {
                    $_result[] = $_arg;
                }
                else
                {
                    foreach ( $_arg as $_value )
                    {
                        $_result[] = $_value;
                    }
                }
            }
        }

        //	Return the fresh array...
        return $_result;
    }
1204097
public function decode(string $data): array
    {
        try {
            $decoded = Yaml::parse($data);
        } catch (ParseException $e) {
            throw DeserializerRuntimeException::createNotParsable($this->getContentType());
        }

        if (!is_array($decoded)) {
            throw DeserializerRuntimeException::createNotParsable($this->getContentType());
        }

        return $decoded;
    }
794333
protected function prepareData($data)
    {
        if(!is_array($data))
        {
            $data = [];
        }
        
        $data['access_token'] = $this->config->accessToken;
        
        return http_build_query($data);
    }
391893
public function readFromArray(array $data) : array
    {
        foreach($data as $key => $value)
        {
            if (is_string($value)){
                $value = $this->macro_processor->process($value);
                $data[$key] = $value;
            }
            else if(is_array($value)){
                $data[$key] = $this->readFromArray($value);
            }
        }
        return $data;
    }
1320070
public static function toString($data)
    {
        if (is_array($data)) {
            $newData = [];
            foreach ($data as $key => $val) {
                $key = (string)$key;
                $newData[$key] = static::toString($val);
            }
        } else {
            $newData = (string)$data;
        }

        return $newData;
    }
845606
private static function separate(array $data)
    {
        $array = [];

        foreach ($data as $provider) {

            if(($bool = self::isDelim($provider)) === false) {
                $array['required'][] = $provider;
            }
            else {
                if ($bool[1] === 'true') {
                    $array['required'][] = strval($bool[0]);
                } else {
                    $array['hidden'][] = strval($bool[0]);
                }
            }
        }

        return $array;

    }
111489
private function convertArrayObjects($data)
    {
        if ($data instanceof \ArrayObject || $data instanceof \stdClass) {
            $data = (array) $data;
        }
        if (\is_array($data)) {
            foreach ($data as $k => $v) {
                $data[$k] = $this->convertArrayObjects($v);
            }
        }

        return $data;
    }
1283792
protected function asArray($data)
	{
		$array = array();

		if (is_object($data))
		{
			$data = get_object_vars($data);
		}

		foreach ($data as $k => $v)
		{
			if (is_object($v) || is_array($v))
			{
				$array[$k] = $this->asArray($v);
			}
			else
			{
				$array[$k] = $v;
			}
		}

		return $array;
	}
310102
public function toArray(array $data = [])
    {
        return array_filter(array_merge([
            'start' => $this->start,
            'range' => $this->range,
            'sort' => $this->sort,
            'sortDir' => $this->sortDirection,
            'search' => $this->search,
            'searchNotes' => $this->searchNotes,
            'condition' => $this->condition ? json_encode($this->condition) : null
        ], $data), function ($value) {
            return $value !== null;
        });
    }
1288324
protected function toArrayRecursive($data)
    {
        $type = $data->getType();
        if (is_array($data->getValue())) {
            $result = [
                self::TYPE_LIST => [],
                'type'          => self::TYPE_LIST
            ];
            foreach ($data->getValue() as $key => $value) {
                if ($value instanceof $this) {
                    $result[self::TYPE_LIST][] = $data->toArrayRecursive($value);
                }
            }
            return $result;
        } else {
            return [
                $type  => $data->getValue(),
                'type' => $type,
            ];
        }
    }
1007794
private function getValues(&$data) {
        $values = [];
        foreach ($data as $i => $row) {
            $skipImport = isset($this->skipImport) ? call_user_func($this->skipImport, $row) : false;
            if (!$skipImport) {
                foreach ($this->configs as $config) {
                    $value = call_user_func($config['value'], $row);
                    $values[$i][$config['attribute']] = $value;
                }
            }
        }
        //Filter unique values by unique attributes
        $values = $this->filterUniqueValues($values);
        return $values;
    }
1111667
public static function normalize($data)
    {
        $result = [];

        foreach ($data as $key => $value) {
            if (!is_int($key)) {
                $result[$key] = $value;
                continue;
            }
            if (!is_scalar($value)) {
                throw new Exception("Invalid array format, a value can't be normalized");
            }
            $result[$value] = null;
        }
        return $result;
    }
471315
private function getRequestData(string $data) : array
    {
        if (preg_match_all('`\\&([^=]+)\\=`', '&' . $data, $matches)) {
            foreach (array_count_values($matches[1]) as $key => $count) {
                if ($count <= 1) {
                    continue;
                }
                if (stripos($key, '[') !== false) {
                    continue;
                }

                $data = str_replace('&' . $key . '=', '&' . $key . '[]=', $data);

                if (strpos($data, $key . '=') === 0) {
                    $data = $key . '[]' . substr($data, strpos($data, '='));
                }
            }
        }

        parse_str($data, $return);

        return is_array($return) ? $return : [];
    }
1288348
public static function parse($data)
    {
        $xml = null;
        if ($xml = simplexml_load_string($data)) {
            $xml = (array)$xml;
        }
        return $xml;
    }
412507
public static function parseArray(array $data)
    {
        $type = strtoupper($data['data_type']);
        if (!defined(static::class . '::' . $type))
            throw new InvalidValueException("Invalid column type: $type");
            
        return array(
            'name' => $data['column_name'],
            'type' => $type,
            'max_length' => $data['character_maximum_length'] ?? null,
            'is_nullable' => isset($data['is_nullable']) ? $data['is_nullable'] == true : false,
            'column_default' => $data['column_default'] ?? null,
            'numeric_precision' => $data['numeric_precision'] ?? null,
            'numeric_scale' => $data['numeric_scale'] ?? null,
            'serial' => isset($data['serial']) ? $data['serial'] == true : false,
            'enum_values' => $data['enum_values'] ?? null
        );
    }
1214620
public static function format(array $data) {
        return array_map(function ($item) {
            $args = static::toArrOrNone($item);
            if (false !== $args) {
                return $args;
            }
            return $item;
        }, $data);
    }
91126
protected function _toArray($data)
    {
        $array = array();

        foreach ($data as $key => $value) {
            if (is($value, 'AnDomainBehaviorSerializable')) {
                $array[$key] = $value->toSerializableArray();
            } elseif (is_array($value)) {
                $array[$key] = $this->_toArray($value);
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }