protected static function flatArray(array &$result, array $array, $connector = '.', $prefix = null)
    {
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                static::flatArray($result, $value, $connector, $prefix.$key.$connector);
                continue;
            }

            $result[$prefix.$key] = $value;
        }
    }
protected static function flatArray(array &$result, array $array, $connector = '.', $prefix = null)
    {
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                static::flatArray($result, $value, $connector, $prefix.$key.$connector);
                continue;
            }

            $result[$prefix.$key] = $value;
        }
    }
protected static function flatArray ( array & $ result , array $ array , $ connector = '.' , $ prefix = null ) { foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) ) { static :: flatArray ( $ result , $ value , $ connector , $ prefix . $ key . $ connector ) ; continue ; } $ result [ $ prefix . $ key ] = $ value ; } }
Recursively converts nested array into a flat one with keys preserving.

@param array  $result    Resulting array
@param array  $array     Source array
@param string $prefix    Key's prefix
@param string $connector Levels connector
Recursively converts nested array into a flat one with keys preserving .