public static function unflatten(array $array, $delimiter = '.')
    {
        $unflattenedArray = array();

        foreach ($array as $key => $value) {
            $keyList  = explode($delimiter, $key);
            $firstKey = array_shift($keyList);

            if (sizeof($keyList) > 0) {
                $subArray = static::unflatten(array( implode($delimiter, $keyList) => $value ), $delimiter);

                foreach ($subArray as $subArrayKey => $subArrayValue) {
                    $unflattenedArray[ $firstKey ][ $subArrayKey ] = $subArrayValue;
                }
            } else {
                $unflattenedArray[ $firstKey ] = $value;
            }
        }

        return $unflattenedArray;
    }