递归将数组中的键转为驼峰

@param array $array 数组
@return array
966523
public static function keyToCamel($array)
    {
        $result = [];
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $result[Strings::case2camel($key)] = self::keyToCamel($value);
            } else {
                $result[Strings::case2camel($key)] = $value;
            }
        }
        return $result;
    }
1336247
public function quoteArr(array $array)
    {
        $result = array();

        foreach ($array as $key => $item) {
            $result[$key] = $this->quote($item);
        }

        return $result;
    }
880218
public function flattenArray($array)
    {
        $result = [];
        foreach (array_dot($array) as $key => $value) {
            $splitKey = explode('.', $key);
            $newKey = $this->createArrayKey($splitKey);
            $result = array_merge($result, [$newKey => $value]);
        }

        return $result;
    }
471507
private function rksort(array $array)
    {
        ksort($array);
        foreach ($array as $k => $v) {
            if (is_array($v)) {
                $array[$k] = $this->rksort($v);
            }
        }
        return $array;
    }
260471
public function flatter($array)
    {
        $result = [];
        foreach ($array as $item) {
            if (is_array($item)) {
                $result = array_merge($result, $this->flatter($item));
            } else {
                $result[] = $item;
            }
        }

        return $result;
    }
1057578
private function getArrayValues($array)
    {
        $out = [];
        $it = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($array));

        foreach ($it as $value) {
            $out[] = $value;
        }
        return $out;
    }
585365
public function sort(array $array): array {
        $array = \array_values($array);
        $length = \count($array);

        if (0 === $length || 1 === $length) return $array;

        for ($i = 0; $i < $length; $i++) {
            $min = $i;
            for ($j = $i; $j < $length; $j++) {
                if (Comparator::lessThan($array[$j], $array[$min])) {
                    $min = $j;
                }
            }
            $tmp = $array[$min];
            $array[$min] = $array[$i];
            $array[$i] = $tmp;
        }
        return $array;
    }
301037
public static function associativeArray(array $array) {
        $string = '[ ';
        foreach($array as $key => $item) {
            $string .= $key . ' => ' . $item;
            if($item !== last($array)) {
                $string .= ', ';
            }
        }
        $string .= ' ]';

        return $string;
    }
392515
protected function filterArray(array $array): array
	{
		$newArray = [];

		foreach($array as $row)
		{
			$newArray[] =  (is_array($row)) ? $row[0] : $row;
		}

		return $newArray;
	}
1218840
public static function arrayObject($array)
    {
        if (is_array($array)) {
            $object = new \stdClass();
            foreach ($array as $key => $value) {
                if (is_array($value)) {
                    $object->$key = static::arrayObject($value);
                } else {
                    $object->$key = $value;
                }
            }

            return (object) $object;
        }

        return false;
    }
891820
protected function normalizeKeys(array $array): array
	{
		$normalized = [];

		foreach($array as $key => $value)
		{
			$normalized[mb_strtolower($key)] = $value;
		}

		return $normalized;
	}
244404
public static function productOfArray($array)
    {
        $res = $array[0];

        for ($i = 1; $i < count($array); $i++) {
            $res = $res * $array[$i];
        }

        return $res;
    }
1164492
public function arrayCopy(array $array)
    {
        $copy = [];

        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $copy[ $key ] = $this->arrayCopy($value);
            } elseif (is_object($value)) {
                $copy[ $key ] = clone $value;
            } else {
                $copy[ $key ] = $value;
            }
        }

        return $copy;
    }
696609
public function translateArray(array $array)
    {
        $result = array();

        foreach ($array as $key => $value) {
            // Group translation
            if (is_array($value)) {
                $key = $this->translate($key);

                // If group is not created yet, create it
                if (!isset($result[$key])){
                    $result[$key] = array();
                }

                foreach($value as $index => $inner) {
                    $result[$key][$index] = $this->translate($inner);
                }
                
            } else if (is_scalar($value)) {
                $result[$key] = $this->translate($value);
            } else {
                throw new InvalidArgumentException('Invalid array supplied');
            }
        }

        return $result;
    }
1262398
public static function array_copy($array)
    {
        if (!is_array($array)) {
            return $array;
        }

        $result = array();
        foreach ($array as $key => $val) {
            if (is_array($val)) {
                $result[$key] = self::array_copy($val);
            } elseif (is_object($val)) {
                $result[$key] = clone $val;
            } else {
                $result[$key] = $val;
            }
        }
        return $result;
    }
303576
private static function arrayToObject(array $array)
    {
        $is_object = false;

        foreach ($array as $key => &$value) {
            if (is_array($value)) {
                $value = self::arrayToObject($value);
            }

            if (is_string($key)) {
                $is_object = true;
            }
        }

        return $is_object ? (object) $array : $array;
    }
917838
public function quoteArray(array $array): array
    {
        if (empty($array)) {
            return [];
        }
        foreach ($array as $key => $value) {
            if ($value instanceof RawExp) {
                $array[$key] = $value->getValue();
                continue;
            }

            $array[$key] = $this->quoteValue($value);
        }

        return $array;
    }