DynamicActiveRecord.php
protected static function dotKeyValues($prefix, $array)
    {
        $fields = [];
        foreach ($array as $key => $value) {
            if (is_string($key)) {
                $newPos = $prefix . '.' . $key;
                if (is_array($value)) {
                    $fields = array_merge($fields, static::dotKeyValues($newPos, $value));
                } else {
                    $fields[$newPos] = $value;
                }
            }
        }

        return $fields;
    }
protected static function dotKeyValues($prefix, $array)
    {
        $fields = [];
        foreach ($array as $key => $value) {
            if (is_string($key)) {
                $newPos = $prefix . '.' . $key;
                if (is_array($value)) {
                    $fields = array_merge($fields, static::dotKeyValues($newPos, $value));
                } else {
                    $fields[$newPos] = $value;
                }
            }
        }

        return $fields;
    }
protected static function dotKeyValues ( $ prefix , $ array ) { $ fields = [ ] ; foreach ( $ array as $ key => $ value ) { if ( is_string ( $ key ) ) { $ newPos = $ prefix . '.' . $ key ; if ( is_array ( $ value ) ) { $ fields = array_merge ( $ fields , static :: dotKeyValues ( $ newPos , $ value ) ) ; } else { $ fields [ $ newPos ] = $ value ; } } } return $ fields ; }
Convert a nested array to a map of dot-notation keys to values.

@param string $prefix Prefix returned array keys with this string
@param array $array Nested array of attributeName => value pairs

@return array Map of keys in dotted notation to corresponding values
Convert a nested array to a map of dot - notation keys to values .