Back to index

php5  5.3.10
Defines | Functions | Variables
php_intl.c File Reference
#include "php_intl.h"
#include "intl_error.h"
#include "collator/collator_class.h"
#include "collator/collator.h"
#include "collator/collator_attr.h"
#include "collator/collator_compare.h"
#include "collator/collator_sort.h"
#include "collator/collator_convert.h"
#include "collator/collator_locale.h"
#include "collator/collator_create.h"
#include "collator/collator_error.h"
#include "formatter/formatter.h"
#include "formatter/formatter_class.h"
#include "formatter/formatter_attr.h"
#include "formatter/formatter_format.h"
#include "formatter/formatter_main.h"
#include "formatter/formatter_parse.h"
#include "msgformat/msgformat.h"
#include "msgformat/msgformat_class.h"
#include "msgformat/msgformat_attr.h"
#include "msgformat/msgformat_format.h"
#include "msgformat/msgformat_parse.h"
#include "normalizer/normalizer.h"
#include "normalizer/normalizer_class.h"
#include "normalizer/normalizer_normalize.h"
#include "locale/locale.h"
#include "locale/locale_class.h"
#include "locale/locale_methods.h"
#include "dateformat/dateformat.h"
#include "dateformat/dateformat_class.h"
#include "dateformat/dateformat_attr.h"
#include "dateformat/dateformat_format.h"
#include "dateformat/dateformat_parse.h"
#include "dateformat/dateformat_data.h"
#include "resourcebundle/resourcebundle_class.h"
#include "idn/idn.h"
#include "common/common_error.h"
#include <unicode/uloc.h>
#include <ext/standard/info.h>
#include "php_ini.h"

Go to the source code of this file.

Defines

#define INTL_MODULE_VERSION   PHP_INTL_VERSION
#define intl_0_args   collator_static_0_args
#define intl_1_arg   collator_static_1_arg

Functions

 ZEND_ARG_INFO (1, arg5)
static PHP_GINIT_FUNCTION (intl)
 PHP_MINIT_FUNCTION (intl)
 PHP_MSHUTDOWN_FUNCTION (intl)
 PHP_RINIT_FUNCTION (intl)
 PHP_RSHUTDOWN_FUNCTION (intl)
 PHP_MINFO_FUNCTION (intl)

Variables

zend_module_entry intl_module_entry

Define Documentation

#define intl_0_args   collator_static_0_args

Definition at line 163 of file php_intl.c.

#define intl_1_arg   collator_static_1_arg

Definition at line 164 of file php_intl.c.

Definition at line 76 of file php_intl.c.


Function Documentation

static PHP_GINIT_FUNCTION ( intl  ) [static]

Definition at line 532 of file php_intl.c.

{
       memset( intl_globals, 0, sizeof(zend_intl_globals) );
}
PHP_MINFO_FUNCTION ( intl  )

Definition at line 648 of file php_intl.c.

{
       php_info_print_table_start();
       php_info_print_table_header( 2, "Internationalization support", "enabled" );
       php_info_print_table_row( 2, "version", INTL_MODULE_VERSION );
       php_info_print_table_row( 2, "ICU version", U_ICU_VERSION );
#ifdef U_ICU_DATA_VERSION
       php_info_print_table_row( 2, "ICU Data version", U_ICU_DATA_VERSION );
#endif
       php_info_print_table_end();

    /* For the default locale php.ini setting */
    DISPLAY_INI_ENTRIES() ;
}

Here is the call graph for this function:

PHP_MINIT_FUNCTION ( intl  )

Definition at line 540 of file php_intl.c.

{
       /* For the default locale php.ini setting */
       REGISTER_INI_ENTRIES();

       REGISTER_LONG_CONSTANT("INTL_MAX_LOCALE_LEN", INTL_MAX_LOCALE_LEN, CONST_CS);
       REGISTER_STRING_CONSTANT("INTL_ICU_VERSION", U_ICU_VERSION, CONST_PERSISTENT | CONST_CS);
#ifdef U_ICU_DATA_VERSION
       REGISTER_STRING_CONSTANT("INTL_ICU_DATA_VERSION", U_ICU_DATA_VERSION, CONST_PERSISTENT | CONST_CS);
#endif 

       /* Register 'Collator' PHP class */
       collator_register_Collator_class( TSRMLS_C );

       /* Expose Collator constants to PHP scripts */
       collator_register_constants( INIT_FUNC_ARGS_PASSTHRU );

       /* Register 'NumberFormatter' PHP class */
       formatter_register_class( TSRMLS_C );

       /* Expose NumberFormatter constants to PHP scripts */
       formatter_register_constants( INIT_FUNC_ARGS_PASSTHRU );

       /* Register 'Normalizer' PHP class */
       normalizer_register_Normalizer_class( TSRMLS_C );

       /* Expose Normalizer constants to PHP scripts */
       normalizer_register_constants( INIT_FUNC_ARGS_PASSTHRU );

       /* Register 'Locale' PHP class */
       locale_register_Locale_class( TSRMLS_C );

       /* Expose Locale constants to PHP scripts */
       locale_register_constants( INIT_FUNC_ARGS_PASSTHRU );

       msgformat_register_class(TSRMLS_C);

       grapheme_register_constants( INIT_FUNC_ARGS_PASSTHRU );

       /* Register 'DateFormat' PHP class */
       dateformat_register_IntlDateFormatter_class( TSRMLS_C );

       /* Expose DateFormat constants to PHP scripts */
       dateformat_register_constants( INIT_FUNC_ARGS_PASSTHRU );

       /* Register 'ResourceBundle' PHP class */
       resourcebundle_register_class( TSRMLS_C);

       /* Expose ICU error codes to PHP scripts. */
       intl_expose_icu_error_codes( INIT_FUNC_ARGS_PASSTHRU );

       /* Expose IDN constants to PHP scripts. */
       idn_register_constants(INIT_FUNC_ARGS_PASSTHRU);

       /* Global error handling. */
       intl_error_init( NULL TSRMLS_CC );

       /* Set the default_locale value */
       if( INTL_G(default_locale) == NULL ) {
              INTL_G(default_locale) = pestrdup(uloc_getDefault(), 1) ;
       }

       return SUCCESS;
}

Here is the call graph for this function:

Definition at line 608 of file php_intl.c.

{
    /* For the default locale php.ini setting */
    UNREGISTER_INI_ENTRIES();

    return SUCCESS;
}
PHP_RINIT_FUNCTION ( intl  )

Definition at line 619 of file php_intl.c.

{
       /* Set the default_locale value */
    if( INTL_G(default_locale) == NULL ) {
        INTL_G(default_locale) = pestrdup(uloc_getDefault(), 1) ;
    }
       return SUCCESS;
}

Definition at line 631 of file php_intl.c.

Here is the call graph for this function:

ZEND_ARG_INFO ( ,
arg5   
)

Definition at line 198 of file php_intl.c.

                                       {

       /* collator functions */
       PHP_FE( collator_create, collator_static_1_arg )
       PHP_FE( collator_compare, collator_2_args )
       PHP_FE( collator_get_attribute, collator_1_arg )
       PHP_FE( collator_set_attribute, collator_2_args )
       PHP_FE( collator_get_strength, collator_0_args )
       PHP_FE( collator_set_strength, collator_1_arg )
       PHP_FE( collator_sort, collator_sort_args )
       PHP_FE( collator_sort_with_sort_keys, collator_sort_args )
       PHP_FE( collator_asort, collator_sort_args )
       PHP_FE( collator_get_locale, collator_1_arg )
       PHP_FE( collator_get_error_code, collator_0_args )
       PHP_FE( collator_get_error_message, collator_0_args )
       PHP_FE( collator_get_sort_key, collator_2_args )

       /* formatter functions */
       PHP_FE( numfmt_create, arginfo_numfmt_create )
       PHP_FE( numfmt_format, arginfo_numfmt_format )
       PHP_FE( numfmt_parse, numfmt_parse_arginfo )
       PHP_FE( numfmt_format_currency, arginfo_numfmt_format_currency )
       PHP_FE( numfmt_parse_currency, numfmt_parse_currency_arginfo )
       PHP_FE( numfmt_set_attribute, arginfo_numfmt_set_attribute )
       PHP_FE( numfmt_get_attribute, arginfo_numfmt_get_attribute )
       PHP_FE( numfmt_set_text_attribute, arginfo_numfmt_set_attribute )
       PHP_FE( numfmt_get_text_attribute, arginfo_numfmt_get_attribute )
       PHP_FE( numfmt_set_symbol, arginfo_numfmt_set_symbol )
       PHP_FE( numfmt_get_symbol, arginfo_numfmt_get_attribute )
       PHP_FE( numfmt_set_pattern, arginfo_numfmt_set_pattern )
       PHP_FE( numfmt_get_pattern, arginfo_numfmt_get_error_code )
       PHP_FE( numfmt_get_locale, arginfo_numfmt_get_locale )
       PHP_FE( numfmt_get_error_code, arginfo_numfmt_get_error_code )
       PHP_FE( numfmt_get_error_message, arginfo_numfmt_get_error_code )

       /* normalizer functions */
       PHP_FE( normalizer_normalize, normalizer_args )
       PHP_FE( normalizer_is_normalized, normalizer_args )

       /* Locale functions */
       PHP_NAMED_FE( locale_get_default, zif_locale_get_default, locale_0_args )
       PHP_NAMED_FE( locale_set_default, zif_locale_set_default, locale_1_arg )
       PHP_FE( locale_get_primary_language, locale_1_arg )
       PHP_FE( locale_get_script, locale_1_arg )
       PHP_FE( locale_get_region, locale_1_arg )
       PHP_FE( locale_get_keywords, locale_1_arg )
       PHP_FE( locale_get_display_script, locale_2_args )
       PHP_FE( locale_get_display_region, locale_2_args )
       PHP_FE( locale_get_display_name, locale_2_args )
       PHP_FE( locale_get_display_language, locale_2_args)
       PHP_FE( locale_get_display_variant, locale_2_args )
       PHP_FE( locale_compose, locale_1_arg )
       PHP_FE( locale_parse, locale_1_arg )
       PHP_FE( locale_get_all_variants, locale_1_arg )
       PHP_FE( locale_filter_matches, locale_3_args )
       PHP_FE( locale_canonicalize, locale_1_arg )
       PHP_FE( locale_lookup, locale_4_args )
       PHP_FE( locale_accept_from_http, locale_1_arg )

       /* MessageFormatter functions */
       PHP_FE( msgfmt_create, arginfo_msgfmt_create )
       PHP_FE( msgfmt_format, arginfo_msgfmt_format )
       PHP_FE( msgfmt_format_message, arginfo_msgfmt_format_message )
       PHP_FE( msgfmt_parse, arginfo_msgfmt_parse )
       PHP_FE( msgfmt_parse_message, arginfo_numfmt_parse_message )
       PHP_FE( msgfmt_set_pattern, arginfo_msgfmt_set_pattern )
       PHP_FE( msgfmt_get_pattern, arginfo_msgfmt_get_locale )
       PHP_FE( msgfmt_get_locale, arginfo_msgfmt_get_locale )
       PHP_FE( msgfmt_get_error_code, arginfo_msgfmt_get_error_code )
       PHP_FE( msgfmt_get_error_message, arginfo_msgfmt_get_error_message )

       /* IntlDateFormatter functions */
       PHP_FE( datefmt_create, arginfo_datefmt_create )
       PHP_FE( datefmt_get_datetype, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_get_timetype, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_get_calendar, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_set_calendar, arginfo_datefmt_set_calendar )
       PHP_FE( datefmt_get_locale, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_get_timezone_id, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_set_timezone_id, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_get_pattern, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_set_pattern, arginfo_datefmt_set_pattern )
       PHP_FE( datefmt_is_lenient, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_set_lenient, arginfo_msgfmt_get_locale )
       PHP_FE( datefmt_format, arginfo_datefmt_format )
       PHP_FE( datefmt_parse, datefmt_parse_args )
       PHP_FE( datefmt_localtime , datefmt_parse_args )
       PHP_FE( datefmt_get_error_code, arginfo_msgfmt_get_error_code )
       PHP_FE( datefmt_get_error_message, arginfo_msgfmt_get_error_message )

       /* grapheme functions */
       PHP_FE( grapheme_strlen, grapheme_1_arg )
       PHP_FE( grapheme_strpos, grapheme_search_args )
       PHP_FE( grapheme_stripos, grapheme_search_args )
       PHP_FE( grapheme_strrpos, grapheme_search_args )
       PHP_FE( grapheme_strripos, grapheme_search_args )
       PHP_FE( grapheme_substr, grapheme_substr_args )
       PHP_FE( grapheme_strstr, grapheme_strstr_args )
       PHP_FE( grapheme_stristr, grapheme_strstr_args )
       PHP_FE( grapheme_extract, grapheme_extract_args )

       /* IDN functions */
       PHP_FE( idn_to_ascii, arginfo_idn_to_ascii)
       PHP_FE( idn_to_utf8, arginfo_idn_to_ascii)

       /* ResourceBundle functions */
       PHP_FE( resourcebundle_create, arginfo_resourcebundle_create_proc )
       PHP_FE( resourcebundle_get, arginfo_resourcebundle_get_proc )
       PHP_FE( resourcebundle_count, arginfo_resourcebundle_count_proc )
       PHP_FE( resourcebundle_locales, arginfo_resourcebundle_locales_proc )
       PHP_FE( resourcebundle_get_error_code, arginfo_resourcebundle_get_error_code_proc )
       PHP_FE( resourcebundle_get_error_message, arginfo_resourcebundle_get_error_message_proc )

       /* common functions */
       PHP_FE( intl_get_error_code, intl_0_args )
       PHP_FE( intl_get_error_message, intl_0_args )
       PHP_FE( intl_is_failure, intl_1_arg )
       PHP_FE( intl_error_name, intl_1_arg )

       PHP_FE_END
};

Variable Documentation

zend_module_entry intl_module_entry
Initial value:
 {



       "intl",
       intl_functions,
       PHP_MINIT( intl ),
       PHP_MSHUTDOWN( intl ),
       PHP_RINIT( intl ),
       PHP_RSHUTDOWN( intl ),
       PHP_MINFO( intl ),
       INTL_MODULE_VERSION,
       PHP_MODULE_GLOBALS(intl),   
       PHP_GINIT(intl),            
       NULL,                       
       NULL,                       
       STANDARD_MODULE_PROPERTIES_EX
}

Definition at line 507 of file php_intl.c.