+ input: ['a' => ['b' => 'c']]
+ output: 'a.b = c'

@param array $nestedArray
@return string
348797
private function compileAssignments(array $nestedArray): string
    {
        $assingments = $this->flatten($nestedArray);
        array_walk(
            $assingments,
            function (&$value, $key) {
                $value = sprintf('%s = %s', $key, $value);
            }
        );
        return implode("\n", $assingments);
    }
756563
protected function assocToString($array, $keyValueSeparator = ' - ', $pairSeparator = '; ')
    {
        if (! is_array($array)) {
            return print_r($array, true);
        }

        foreach ($array as $key => &$value) {
            $value = $key . $keyValueSeparator . $value;
        }
        return implode($pairSeparator, $array);
    }
538895
public function getTextFromArray(array $keys = [])
    {
        $values = [];
        foreach ($keys as $key) {
            $values[$key] = $this->getText($key);
        }
        return $values;
    }
539626
public static function listToMultiArray($array)
    {
        $nested = [];
        $depths = [];

        foreach ($array as $key => $arr) {

            if ($arr['depth'] == 0) {
                $nested[$key] = $arr;
            } else {
                $parent =& $nested;

                for ($i = 1; $i <= ($arr['depth']); $i++) {
                    $parent =& $parent[$depths[$i]];
                }

                $parent['pages'][$key] = $arr;
            }

            $depths[$arr['depth'] + 1] = $key;
        }

        return $nested;
    }
980253
private function arraySnakeCase($array)
    {
        $newArray = [];

        foreach ($array as $key => $value) {
            $newArray[snake_case($key)] = $value;
        }

        return $newArray;
    }
1148135
protected function formatData(array $data) : string {
    $data_string = '';

    foreach ($data as $column => $value) {
      $data_string .= "`{$column}` = :{$column}";

      if (next($data) !== false) {
        $data_string .= ', ';
      }
    }

    return $data_string;
  }
212295
protected function formatResponseArray(array $decryptedArray): array
    {
        $formattedArray = [];

        foreach ($decryptedArray as $key => $value) {
            $formattedArray[$this->formatKey($key)] = $value;
        }

        return $formattedArray;
    }
504731
public static function arrayToRegex($array)
    {
        if (isset($array)) {
            foreach ($array as $k => $item) {
                if(is_string($item)){
                    $array[$k] = $item;
                } else {
                    $array[$k] = "\"".$item."\"";
                }
            }
        }

        return implode('|', $array);
    }
925653
public function arrayStringKeys(Array_ $array)
    {
        $keys = [];
        foreach ($array->items as $item) {
            if ($item->key instanceof String_) {
                $keys[] = $item->key->value;
            }
        }

        return $keys;
    }
981152
public function quoteIdentifierArr(array $array)
    {
        $result = array();

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

        return $result;
    }
1057724
public static function getArrayDiffRecursively($array1, $array2)
    {
        $diff_array = [];

        // value 비교
        if (!is_array($array1)) {
            if ($array1 != $array2) {
                return $array1;
            } else {
                return [];
            }
        }

        // array 비교
        foreach ($array1 as $key => $value) {
            if (is_array($value)) {
                if (!is_array($array2[$key])) {
                    $diff_array[$key] = $value;
                } else {
                    $sub_diff_array = ArrayUtils::getArrayDiffRecursively($value, $array2[$key]);
                    if (count($sub_diff_array)) {
//                        $diff_array[$key] = $sub_diff_array;
                        $diff_array[$key] = $value;
                    }
                }
            } elseif ($array2[$key] != $value) {
                $diff_array[$key] = $value;
            }
        }
        return $diff_array;
    }
629306
static function arrayToCode(array $arrray, array $syntax, $indent = '    ', &$indentLevel = 1)
    {
        $result = "";
        $ia_accos = F::isAssoc($arrray);
        foreach ($arrray as $key => $value){
            $result .= str_repeat($indent, $indentLevel);
            $result .= $ia_accos ? ((is_int($key) ? $key : "'" . addslashes($key) . "'") . ' => ') : '';
            if (is_array($value)){
                if ($value === []) {
                    $result .= $syntax['open'] . $syntax['close'] . ",\n";
                }else{
                    $indentLevel++;
                    $result .= $syntax['open'] . "\n"
                        . self::arrayToCode($value, $syntax, $indent, $indentLevel)
                        . str_repeat($indent, --$indentLevel) . $syntax['close'] . ",\n";
                }
            }else
            if (is_object($value) || is_string($value)){
                $result .= var_export($value, true) . ",\n";
            }else
            if (is_bool($value)){
                $result .= ($value ? 'true' : 'false') . ",\n";
            }else
            if ($value === null){
                $result .= "null,\n";
            }else{
                $result .= $value . ",\n";
            }
        }
        return $result;
    }
906807
private function composeFormInputs(array $data, $baseKey = '')
    {
        $result = [];
        foreach ($data as $key => $value) {
            if (!empty($baseKey)) {
                $key = $baseKey . '[' . $key . ']';
            }
            if (is_array($value)) {
                $result = array_merge($result, $this->composeFormInputs($value, $key));
            } else {
                $result[$key] = $value;
            }
        }
        return $result;
    }
693262
public static function keyedArray($array) {
        if(is_array($array)) {
            $string = '[ ';
            foreach($array as $key => $item) {
                if(!is_string($item)) {
                    $item = self::keyedArray($item);
                }
                $string .= $key . ' => ' . $item;
                if($item !== last($array)) {
                    $string .= ', ';
                }
            }
            $string .= ' ]';

            return $string;
        } else {
            if(is_object($array)) {
                return get_class($array);
            } else {
                if(is_null($array)) {
                    return 'Null';
                } else {
                    return 'Unknown';
                }
            }
        }
    }
301037
public static function associativeArray(array $array) {
        $string = '[ ';
        foreach($array as $key => $item) {
            $string .= $key . ' => ' . $item;
            if($item !== last($array)) {
                $string .= ', ';
            }
        }
        $string .= ' ]';

        return $string;
    }
448839
protected function quoteArray(array $array)
    {
        array_walk(
            $array,
            function (&$value) {
                $value = $this->entityManager->getConnection()->quote($value);
            }
        );

        return implode(', ', $array);
    }
1332743
public static function caseConvertArrayKeysRecursively(
        array $array,
        string $method = self::PASCALCASE,
        string $separator = '_'
    ): array {
        $return = [];
        foreach ($array as $key => $value) {
            if (!preg_match('/^\d+$/', $key)) {
                $key = self::$method(preg_replace('/\-/', '_', $key), true, $separator);
            }
            if (is_array($value)) {
                $value = self::caseConvertArrayKeysRecursively($value, $method);
            }
            $return[$key] = $value;
        }
        return $return;
    }