public static function expand(array $array)
    {
        $result = array();

        foreach ($array as $key => $value) {
            $references = self::explodeKeys((string)$key); // cast for performance
            $value = self::expandValue($value);

            if (count($references) === 1) {
                $key = $references[0];

                // If the result key is already set, we have to merge
                // the two values.
                if (array_key_exists($key, $result)) {
                    $result[$key] = self::mergeTwoValues($result[$key], $value, array($key));
                }
                else {
                    $result[$key] = $value;
                }
            }
            else {
                self::dereferenceDots($result, $references, $value);
            }
        }

        return $result;
    }
public static function expand(array $array)
    {
        $result = array();

        foreach ($array as $key => $value) {
            $references = self::explodeKeys((string)$key); // cast for performance
            $value = self::expandValue($value);

            if (count($references) === 1) {
                $key = $references[0];

                // If the result key is already set, we have to merge
                // the two values.
                if (array_key_exists($key, $result)) {
                    $result[$key] = self::mergeTwoValues($result[$key], $value, array($key));
                }
                else {
                    $result[$key] = $value;
                }
            }
            else {
                self::dereferenceDots($result, $references, $value);
            }
        }

        return $result;
    }
public static function expand ( array $ array ) { $ result = array ( ) ; foreach ( $ array as $ key => $ value ) { $ references = self :: explodeKeys ( ( string ) $ key ) ; // cast for performance $ value = self :: expandValue ( $ value ) ; if ( count ( $ references ) === 1 ) { $ key = $ references [ 0 ] ; // If the result key is already set, we have to merge // the two values. if ( array_key_exists ( $ key , $ result ) ) { $ result [ $ key ] = self :: mergeTwoValues ( $ result [ $ key ] , $ value , array ( $ key ) ) ; } else { $ result [ $ key ] = $ value ; } } else { self :: dereferenceDots ( $ result , $ references , $ value ) ; } } return $ result ; }
Convert a dot notation array to a normal PHP array, recursively expanding the dotted keys.

@param  array $array Array to expand.

@return array The expanded array.
@throws InconsistentKeyTypes
Convert a dot notation array to a normal PHP array recursively expanding the dotted keys .