Back to index

php5  5.3.10
Functions
ut_common.inc File Reference

Go to the source code of this file.

Functions

 ut_run ()
 dump ($val)
 ut_coll_create ($locale)
 ut_coll_compare ($coll, $str1, $str2)
 ut_coll_sort ($coll, &$arr, $sort_flag=Collator::SORT_REGULAR)
 ut_coll_sort_with_sort_keys ($coll, &$arr)
 ut_coll_get_sort_key ($coll, $str)
 ut_coll_asort ($coll, &$arr, $sort_flag=Collator::SORT_REGULAR)
 ut_coll_get_locale ($coll, $type)
 ut_coll_get_display_name ($obj_loc, $disp_loc)
 ut_coll_get_available_locales ()
 ut_coll_get_attribute ($coll, $attr)
 ut_coll_get_strength ($coll)
 ut_coll_set_strength ($coll, $strength)
 ut_coll_set_attribute ($coll, $attr, $val)
 ut_coll_get_variable_top ($coll)
 ut_coll_set_variable_top ($coll, $var_top)
 ut_coll_restore_variable_top ($coll, $var_top)
 ut_coll_get_error_code ($coll)
 ut_coll_get_error_message ($coll)
 ut_coll_get_default ()
 ut_coll_set_default ($coll)
 ut_nfmt_create ($locale, $style, $pattern=null)
 ut_nfmt_format ($fmt, $number, $type=null)
 ut_nfmt_parse ($fmt, $string, $type=NumberFormatter::TYPE_DOUBLE, &$position=null)
 ut_nfmt_format_currency ($fmt, $number, $currency)
 ut_nfmt_parse_currency ($fmt, $string, &$currency, &$position=null)
 ut_nfmt_set_attribute ($fmt, $attribute, $value)
 ut_nfmt_set_text_attribute ($fmt, $attribute, $value)
 ut_nfmt_set_symbol ($fmt, $attribute, $value)
 ut_nfmt_set_pattern ($fmt, $pattern)
 ut_nfmt_get_attribute ($fmt, $attribute)
 ut_nfmt_get_text_attribute ($fmt, $attribute)
 ut_nfmt_get_symbol ($fmt, $attribute)
 ut_nfmt_get_pattern ($fmt)
 ut_nfmt_get_locale ($fmt, $type=0)
 ut_nfmt_get_error_code ($fmt)
 ut_nfmt_get_error_message ($fmt)
 ut_norm_normalize ($str, $form)
 ut_norm_is_normalized ($str, $form)
 ut_loc_get_default ()
 ut_loc_set_default ($locale)
 ut_loc_get_primary_language ($locale)
 ut_loc_get_script ($locale)
 ut_loc_get_region ($locale)
 ut_loc_get_keywords ($locale)
 ut_loc_get_display_name ($locale, $dispLocale)
 ut_loc_get_display_language ($locale, $dispLocale)
 ut_loc_get_display_script ($locale, $dispLocale)
 ut_loc_get_display_region ($locale, $dispLocale)
 ut_loc_get_display_variant ($locale, $dispLocale)
 ut_loc_locale_compose ($loc_parts_arr)
 ut_loc_locale_parse ($locale)
 ut_loc_locale_get_all_variants ($locale)
 ut_loc_locale_filter_matches ($lang_tag, $loc_range, $isCanonical)
 ut_loc_canonicalize ($locale)
 ut_loc_locale_lookup ($lang_tag_arr, $loc_range, $isCanonical, $default_loc)
 ut_loc_accept_http ($http)
 ut_msgfmt_create ($locale, $pattern)
 ut_msgfmt_format ($fmt, $args)
 ut_msgfmt_parse ($fmt, $string)
 ut_msgfmt_format_message ($locale, $pattern, $args)
 ut_msgfmt_parse_message ($locale, $pattern, $string)
 ut_msgfmt_set_pattern ($fmt, $pattern)
 ut_msgfmt_get_pattern ($fmt)
 ut_msgfmt_get_locale ($fmt)
 ut_msgfmt_get_error_code ($fmt)
 ut_msgfmt_get_error_message ($fmt)
 ut_datefmt_create ($locale, $datetype, $timetype, $timezone=null, $calendar=null, $pattern=null)
 ut_datefmt_get_datetype ($fmt)
 ut_datefmt_get_timetype ($fmt)
 ut_datefmt_get_calendar ($fmt)
 ut_datefmt_set_calendar ($fmt, $calendar)
 ut_datefmt_get_timezone_id ($fmt)
 ut_datefmt_set_timezone_id ($fmt, $timezone_id)
 ut_datefmt_get_pattern ($fmt)
 ut_datefmt_set_pattern ($fmt, $pattern)
 ut_datefmt_get_locale ($fmt, $type=ULOC_ACTUAL_LOCALE)
 ut_datefmt_is_lenient ($fmt)
 ut_datefmt_set_lenient ($fmt, $lenient)
 ut_datefmt_format ($fmt, $value)
 ut_datefmt_parse ($fmt, $value, &$parse_pos=0)
 ut_datefmt_localtime ($fmt, $value, &$parse_pos=0)
 ut_resourcebundle_create ($locale, $bundle, $fallback=true)
 ut_resourcebundle_count ($bundle)
 ut_resourcebundle_locales ($bundle)
 ut_resourcebundle_get ($bundle, $idx)
 ut_resourcebundle_get_error_code ($bundle)
 ut_resourcebundle_get_error_message ($bundle)

Function Documentation

dump ( val)

Definition at line 37 of file ut_common.inc.

{
    return var_export( $val, true );
}
ut_coll_asort ( coll,
&$  arr,
sort_flag = Collator::SORT_REGULAR 
)

Definition at line 66 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->asort( $arr, $sort_flag ) : collator_asort( $coll, $arr, $sort_flag );
}

Here is the call graph for this function:

ut_coll_compare ( coll,
str1,
str2 
)

Definition at line 50 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->compare( $str1, $str2 ) : collator_compare( $coll, $str1, $str2 );
}

Here is the call graph for this function:

ut_coll_create ( locale)

Definition at line 46 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Collator::create( $locale ) : collator_create( $locale );
}

Here is the call graph for this function:

ut_coll_get_attribute ( coll,
attr 
)

Definition at line 82 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->getAttribute( $attr ) : collator_get_attribute( $coll, $attr );
}

Here is the call graph for this function:

Definition at line 78 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Collator::getAvailableLocales() : collator_get_available_locales();
}

Definition at line 118 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Collator::getDefault() : collator_get_default();
}
ut_coll_get_display_name ( obj_loc,
disp_loc 
)

Definition at line 74 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Collator::getDisplayName( $obj_loc, $disp_loc ) : collator_get_display_name( $obj_loc, $disp_loc );
}

Definition at line 110 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->getErrorCode() : collator_get_error_code( $coll );
}

Here is the call graph for this function:

Definition at line 114 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->getErrorMessage() : collator_get_error_message( $coll );
}

Here is the call graph for this function:

ut_coll_get_locale ( coll,
type 
)

Definition at line 70 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->getLocale( $type ) : collator_get_locale( $coll, $type );
}

Here is the call graph for this function:

ut_coll_get_sort_key ( coll,
str 
)

Definition at line 62 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->getSortKey( $str ) : collator_get_sort_key( $coll, $str );
}
ut_coll_get_strength ( coll)

Definition at line 86 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->getStrength() : collator_get_strength( $coll );
}

Here is the call graph for this function:

Definition at line 98 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->getVariableTop() : collator_get_variable_top( $coll );
}
ut_coll_restore_variable_top ( coll,
var_top 
)

Definition at line 106 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->restoreVariableTop( $var_top ) : collator_restore_variable_top( $coll, $var_top );
}
ut_coll_set_attribute ( coll,
attr,
val 
)

Definition at line 94 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->setAttribute( $attr, $val ) : collator_set_attribute( $coll, $attr, $val );
}

Here is the call graph for this function:

ut_coll_set_default ( coll)

Definition at line 122 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Collator::setDefault( $coll ) : collator_set_default( $coll );
}
ut_coll_set_strength ( coll,
strength 
)

Definition at line 90 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->setStrength( $strength ) : collator_set_strength( $coll, $strength );
}

Here is the call graph for this function:

ut_coll_set_variable_top ( coll,
var_top 
)

Definition at line 102 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->setVariableTop( $var_top ) : collator_set_variable_top( $coll, $var_top );
}
ut_coll_sort ( coll,
&$  arr,
sort_flag = Collator::SORT_REGULAR 
)

Definition at line 54 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->sort( $arr, $sort_flag ) : collator_sort( $coll, $arr, $sort_flag );
}

Here is the call graph for this function:

ut_coll_sort_with_sort_keys ( coll,
&$  arr 
)

Definition at line 58 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $coll->sortWithSortKeys( $arr ) : collator_sort_with_sort_keys( $coll, $arr );
}

Here is the call graph for this function:

ut_datefmt_create ( locale,
datetype,
timetype,
timezone = null,
calendar = null,
pattern = null 
)

Definition at line 332 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? datefmt_create( $locale, $datetype, $timetype, $timezone, $calendar ,$pattern ) : datefmt_create( $locale, $datetype, $timetype, $timezone, $calendar ,$pattern);
}

Here is the call graph for this function:

ut_datefmt_format ( fmt,
value 
)

Definition at line 380 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->format(  $value ) : datefmt_format( $fmt ,  $value);
}

Here is the call graph for this function:

Definition at line 344 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getCalendar( ) : datefmt_get_calendar( $fmt );
}

Here is the call graph for this function:

Definition at line 336 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getDateType( ) : datefmt_get_datetype( $fmt );
}

Here is the call graph for this function:

ut_datefmt_get_locale ( fmt,
type = ULOC_ACTUAL_LOCALE 
)

Definition at line 368 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getLocale($type ) : datefmt_get_locale( $fmt ,$type);
}

Here is the call graph for this function:

Definition at line 360 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getPattern() : datefmt_get_pattern( $fmt );
}

Here is the call graph for this function:

Definition at line 340 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getTimeType( ) : datefmt_get_timetype( $fmt );
}

Here is the call graph for this function:

Definition at line 352 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getTimeZoneId( ) : datefmt_get_timezone_id( $fmt );
}

Here is the call graph for this function:

Definition at line 372 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->isLenient() : datefmt_is_lenient( $fmt );
}

Here is the call graph for this function:

ut_datefmt_localtime ( fmt,
value,
&$  parse_pos = 0 
)

Definition at line 388 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->localtime(  $value , $parse_pos ) : datefmt_localtime( $fmt ,  $value , $parse_pos );
}

Here is the call graph for this function:

ut_datefmt_parse ( fmt,
value,
&$  parse_pos = 0 
)

Definition at line 384 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->parse(  $value ,$parse_pos ) : datefmt_parse( $fmt ,  $value,$parse_pos);
}

Here is the call graph for this function:

ut_datefmt_set_calendar ( fmt,
calendar 
)

Definition at line 348 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setCalendar( $calendar ) : datefmt_set_calendar( $fmt , $calendar );
}

Here is the call graph for this function:

ut_datefmt_set_lenient ( fmt,
lenient 
)

Definition at line 376 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setLenient(  $lenient ) : datefmt_set_lenient( $fmt ,  $lenient);
}

Here is the call graph for this function:

ut_datefmt_set_pattern ( fmt,
pattern 
)

Definition at line 364 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setPattern( $pattern ) : datefmt_set_pattern( $fmt ,  $pattern);
}

Here is the call graph for this function:

ut_datefmt_set_timezone_id ( fmt,
timezone_id 
)

Definition at line 356 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setTimeZoneId( $timezone_id ) : datefmt_set_timezone_id( $fmt ,$timezone_id);
}

Here is the call graph for this function:

ut_loc_accept_http ( http)

Definition at line 287 of file ut_common.inc.

                                   {
       return $GLOBALS['oo-mode'] ? Locale::acceptFromHttp($http):locale_accept_from_http($http);
}
ut_loc_canonicalize ( locale)

Definition at line 279 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::canonicalize( $locale ) : locale_canonicalize( $locale );
}

Definition at line 219 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getDefault( ) : locale_get_default();
}

Here is the call graph for this function:

ut_loc_get_display_language ( locale,
dispLocale 
)

Definition at line 247 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getDisplayLanguage( $locale , $dispLocale ) : locale_get_display_language( $locale , $dispLocale );
}

Here is the call graph for this function:

ut_loc_get_display_name ( locale,
dispLocale 
)

Definition at line 243 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getDisplayName( $locale , $dispLocale ) : locale_get_display_name( $locale , $dispLocale );
}

Here is the call graph for this function:

ut_loc_get_display_region ( locale,
dispLocale 
)

Definition at line 255 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getDisplayRegion( $locale, $dispLocale  ) : locale_get_display_region( $locale, $dispLocale  );
}

Here is the call graph for this function:

ut_loc_get_display_script ( locale,
dispLocale 
)

Definition at line 251 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getDisplayScript( $locale , $dispLocale ) : locale_get_display_script( $locale , $dispLocale );
}

Here is the call graph for this function:

ut_loc_get_display_variant ( locale,
dispLocale 
)

Definition at line 259 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getDisplayVariant( $locale , $dispLocale ) : locale_get_display_variant( $locale, $dispLocale  );
}

Here is the call graph for this function:

ut_loc_get_keywords ( locale)

Definition at line 239 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getKeywords( $locale ) : locale_get_keywords( $locale );
}

Here is the call graph for this function:

Definition at line 227 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getPrimaryLanguage( $locale ) : locale_get_primary_language( $locale );
}

Here is the call graph for this function:

ut_loc_get_region ( locale)

Definition at line 235 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getRegion( $locale ) : locale_get_region( $locale );
}

Here is the call graph for this function:

ut_loc_get_script ( locale)

Definition at line 231 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getScript( $locale ) : locale_get_script( $locale );
}

Here is the call graph for this function:

ut_loc_locale_compose ( loc_parts_arr)

Definition at line 263 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::composeLocale( $loc_parts_arr ) : locale_compose( $loc_parts_arr );
}

Here is the call graph for this function:

ut_loc_locale_filter_matches ( lang_tag,
loc_range,
isCanonical 
)

Definition at line 275 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::filterMatches( $lang_tag,$loc_range ,$isCanonical) : locale_filter_matches( $lang_tag,$loc_range ,$isCanonical);
}

Here is the call graph for this function:

Definition at line 271 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::getAllVariants( $locale ) : locale_get_all_variants( $locale );
}

Here is the call graph for this function:

ut_loc_locale_lookup ( lang_tag_arr,
loc_range,
isCanonical,
default_loc 
)

Definition at line 283 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::lookup( $lang_tag_arr,$loc_range,$isCanonical,$default_loc ) : locale_lookup( $lang_tag_arr,$loc_range,$isCanonical,$default_loc );
}

Here is the call graph for this function:

ut_loc_locale_parse ( locale)

Definition at line 267 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Locale::parseLocale( $locale ) : locale_parse($locale );
}

Here is the call graph for this function:

ut_loc_set_default ( locale)

Definition at line 223 of file ut_common.inc.

{
       return $GLOBALS['oo-mode'] ? Locale::setDefault( $locale  ) : locale_set_default( $locale );
}

Here is the call graph for this function:

ut_msgfmt_create ( locale,
pattern 
)

Definition at line 291 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? MessageFormatter::create( $locale, $pattern ) : msgfmt_create( $locale, $pattern );
}

Here is the call graph for this function:

ut_msgfmt_format ( fmt,
args 
)

Definition at line 295 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->format( $args ) : msgfmt_format( $fmt, $args);
}

Here is the call graph for this function:

ut_msgfmt_format_message ( locale,
pattern,
args 
)

Definition at line 303 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? MessageFormatter::formatMessage( $locale, $pattern, $args ) : msgfmt_format_message( $locale, $pattern, $args );
}

Here is the call graph for this function:

Definition at line 323 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getErrorCode() : msgfmt_get_error_code( $fmt );
}

Here is the call graph for this function:

Definition at line 327 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getErrorMessage() : msgfmt_get_error_message( $fmt );
}

Here is the call graph for this function:

Definition at line 319 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getLocale( ) : msgfmt_get_locale( $fmt );
}

Here is the call graph for this function:

Definition at line 315 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getPattern() : msgfmt_get_pattern( $fmt );
}

Here is the call graph for this function:

ut_msgfmt_parse ( fmt,
string 
)

Definition at line 299 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->parse( $string) : msgfmt_parse( $fmt, $string);
}

Here is the call graph for this function:

ut_msgfmt_parse_message ( locale,
pattern,
string 
)

Definition at line 307 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? MessageFormatter::parseMessage( $locale, $pattern, $string ) : msgfmt_parse_message( $locale, $pattern, $string );
}

Here is the call graph for this function:

ut_msgfmt_set_pattern ( fmt,
pattern 
)

Definition at line 311 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setPattern( $pattern ) : msgfmt_set_pattern( $fmt, $pattern );
}

Here is the call graph for this function:

ut_nfmt_create ( locale,
style,
pattern = null 
)

Definition at line 133 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? new NumberFormatter( $locale, $style, $pattern ) : numfmt_create( $locale, $style, $pattern );
}

Here is the call graph for this function:

ut_nfmt_format ( fmt,
number,
type = null 
)

Definition at line 137 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->format( $number, $type ) : numfmt_format( $fmt, $number, $type );
}

Here is the call graph for this function:

ut_nfmt_format_currency ( fmt,
number,
currency 
)

Definition at line 149 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->formatCurrency( $number, $currency ) : numfmt_format_currency( $fmt, $number, $currency );
}

Here is the call graph for this function:

ut_nfmt_get_attribute ( fmt,
attribute 
)

Definition at line 177 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getAttribute( $attribute ) : numfmt_get_attribute( $fmt, $attribute );
}

Here is the call graph for this function:

Definition at line 197 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getErrorCode() : numfmt_get_error_code( $fmt );
}

Here is the call graph for this function:

Definition at line 201 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getErrorMessage() : numfmt_get_error_message( $fmt );
}

Here is the call graph for this function:

ut_nfmt_get_locale ( fmt,
type = 0 
)

Definition at line 193 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getLocale( $type ) : numfmt_get_locale( $fmt, $type );
}

Here is the call graph for this function:

ut_nfmt_get_pattern ( fmt)

Definition at line 189 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getPattern() : numfmt_get_pattern( $fmt );
}

Here is the call graph for this function:

ut_nfmt_get_symbol ( fmt,
attribute 
)

Definition at line 185 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getSymbol( $attribute ) : numfmt_get_symbol( $fmt, $attribute );
}

Here is the call graph for this function:

ut_nfmt_get_text_attribute ( fmt,
attribute 
)

Definition at line 181 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->getTextAttribute( $attribute ) : numfmt_get_text_attribute( $fmt, $attribute );
}

Here is the call graph for this function:

ut_nfmt_parse ( fmt,
string,
type = NumberFormatter::TYPE_DOUBLE,
&$  position = null 
)

Definition at line 141 of file ut_common.inc.

{
    if(is_null($position)) {
    return $GLOBALS['oo-mode'] ? $fmt->parse( $string, $type ) : numfmt_parse( $fmt, $string, $type );
    } else {
    return $GLOBALS['oo-mode'] ? $fmt->parse( $string, $type, $position ) : numfmt_parse( $fmt, $string, $type, $position );
    }
}

Here is the call graph for this function:

ut_nfmt_parse_currency ( fmt,
string,
&$  currency,
&$  position = null 
)

Definition at line 153 of file ut_common.inc.

{
    if(is_null($position)) {
    return $GLOBALS['oo-mode'] ? $fmt->parseCurrency( $string, $currency ) : numfmt_parse_currency( $fmt, $string, $currency );
    } else {
    return $GLOBALS['oo-mode'] ? $fmt->parseCurrency( $string, $currency, $position ) : numfmt_parse_currency( $fmt, $string, $currency, $position );
   }
}

Here is the call graph for this function:

ut_nfmt_set_attribute ( fmt,
attribute,
value 
)

Definition at line 161 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setAttribute( $attribute, $value ) : numfmt_set_attribute( $fmt, $attribute, $value );
}

Here is the call graph for this function:

ut_nfmt_set_pattern ( fmt,
pattern 
)

Definition at line 173 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setPattern( $pattern ) : numfmt_set_pattern( $fmt, $pattern );
}

Here is the call graph for this function:

ut_nfmt_set_symbol ( fmt,
attribute,
value 
)

Definition at line 169 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setSymbol( $attribute, $value ) : numfmt_set_symbol( $fmt, $attribute, $value );
}

Here is the call graph for this function:

ut_nfmt_set_text_attribute ( fmt,
attribute,
value 
)

Definition at line 165 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $fmt->setTextAttribute( $attribute, $value ) : numfmt_set_text_attribute( $fmt, $attribute, $value );
}

Here is the call graph for this function:

ut_norm_is_normalized ( str,
form 
)

Definition at line 210 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Normalizer::isNormalized( $str, $form ) : normalizer_is_normalized( $str, $form );
}

Here is the call graph for this function:

ut_norm_normalize ( str,
form 
)

Definition at line 206 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? Normalizer::normalize( $str, $form ) : normalizer_normalize( $str, $form );
}

Here is the call graph for this function:

ut_resourcebundle_count ( bundle)

Definition at line 397 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $bundle->count():resourcebundle_count($bundle);
}
ut_resourcebundle_create ( locale,
bundle,
fallback = true 
)

Definition at line 393 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? new ResourceBundle($locale, $bundle, $fallback): resourcebundle_create($locale, $bundle, $fallback);
}
ut_resourcebundle_get ( bundle,
idx 
)

Definition at line 405 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $bundle->get($idx):resourcebundle_get($bundle, $idx);
}

Definition at line 409 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $bundle->getErrorCode():resourcebundle_get_error_code($bundle);
}

Definition at line 413 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? $bundle->getErrorMessage():resourcebundle_get_error_message($bundle);
}

Definition at line 401 of file ut_common.inc.

{
    return $GLOBALS['oo-mode'] ? ResourceBundle::getLocales($bundle):resourcebundle_locales($bundle);
}
ut_run ( )

Definition at line 8 of file ut_common.inc.

{
    // Run unit test in OO mode.
    $GLOBALS['oo-mode'] = true;
    $oo_result = ut_main();

    // Run unit test in procedural mode.
    $GLOBALS['oo-mode'] = false;
    $proc_result = ut_main();

    // Show error if the APIs produce different results.
    if( $proc_result !== $oo_result )
    {
          echo "ERROR: OO- and procedural APIs produce different results!\n";
          echo "OO API output:\n";
          echo str_repeat( '=', 78 ) . "\n";
          echo $oo_result;
          echo str_repeat( '=', 78 ) . "\n";
          echo "procedural API output:\n";
          echo str_repeat( '=', 78 ) . "\n";
          echo $proc_result;
          echo str_repeat( '=', 78 ) . "\n";
          return;
    }

    // Else, if the results are equal, show one of them.
    echo $proc_result;
}