diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2019-11-21 19:35:25 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-02-04 14:50:02 +0100 |
commit | a827db24f1231809b2600a3f0ff233f9c1c01a17 (patch) | |
tree | cc32ad5adbb04cc06f56dcb830420d157715a041 /ext/intl/php_intl.c | |
parent | 223663807a1c1c219eb35064adad544087d568a3 (diff) | |
download | php-git-a827db24f1231809b2600a3f0ff233f9c1c01a17.tar.gz |
Add stubs for IntlCalendar
Closes GH-4846
Diffstat (limited to 'ext/intl/php_intl.c')
-rw-r--r-- | ext/intl/php_intl.c | 230 |
1 files changed, 51 insertions, 179 deletions
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 872d5271bc..b7bab203a7 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -84,6 +84,7 @@ #include "calendar/calendar_class.h" #include "calendar/calendar_methods.h" #include "calendar/gregoriancalendar_methods.h" +#include "calendar/calendar_arginfo.h" #include "breakiterator/breakiterator_class.h" #include "breakiterator/breakiterator_iterators.h" @@ -256,135 +257,6 @@ ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_error, 0, 0, 1 ) ZEND_ARG_OBJ_INFO( 0, trans, Transliterator, 0 ) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_create_instance, 0, 0, 0 ) - ZEND_ARG_INFO( 0, timeZone ) - ZEND_ARG_INFO( 0, locale ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_only_cal, 0, 0, 1 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_void, 0, 0, 0 ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_field, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, field ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_dow, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, dayOfWeek ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_other_cal, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_OBJ_INFO( 0, otherCalendar, IntlCalendar, 0 ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_date, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, date ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_date_optional, 0, 0, 1 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, date ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_get_keyword_values_for_locale, 0, 0, 3) - ZEND_ARG_INFO( 0, key ) - ZEND_ARG_INFO( 0, locale ) - ZEND_ARG_INFO( 0, commonlyUsed ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_add, 0, 0, 3 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, field ) - ZEND_ARG_INFO( 0, amount ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set_time_zone, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, timeZone ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set, 0, 0, 3 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, fieldOrYear ) - ZEND_ARG_INFO( 0, valueOrMonth ) - ZEND_ARG_INFO( 0, dayOfMonth ) - ZEND_ARG_INFO( 0, hour ) - ZEND_ARG_INFO( 0, minute ) - ZEND_ARG_INFO( 0, second ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_roll, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, field ) - ZEND_ARG_INFO( 0, amountOrUpOrDown ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_clear, 0, 0, 1 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, field ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_field_difference, 0, 0, 3 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, when ) - ZEND_ARG_INFO( 0, field ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_get_locale, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, localeType ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set_lenient, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, isLenient ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_set_minimal_days_in_first_week, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, numberOfDays ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(ainfo_cal_from_date_time, 0, 0, 1) - ZEND_ARG_INFO(0, dateTime) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_cal_wall_time_option, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlCalendar, 0 ) - ZEND_ARG_INFO( 0, wallTimeOption ) -ZEND_END_ARG_INFO() - -/* Gregorian Calendar */ -ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_create_instance, 0, 0, 0 ) - ZEND_ARG_INFO(0, timeZoneOrYear) - ZEND_ARG_INFO(0, localeOrMonth) - ZEND_ARG_INFO(0, dayOfMonth) - ZEND_ARG_INFO(0, hour) - ZEND_ARG_INFO(0, minute) - ZEND_ARG_INFO(0, second) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_is_leap_year, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 ) - ZEND_ARG_INFO( 0, year ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_only_gregcal, 0, 0, 1 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 ) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX( ainfo_gregcal_set_gregorian_change, 0, 0, 2 ) - ZEND_ARG_OBJ_INFO( 0, calendar, IntlGregorianCalendar, 0 ) - ZEND_ARG_INFO( 0, date ) -ZEND_END_ARG_INFO() - /* }}} */ /* {{{ intl_functions @@ -543,56 +415,56 @@ static const zend_function_entry intl_functions[] = { PHP_FE( intltz_get_error_code, arginfo_intltz_get_error_code ) PHP_FE( intltz_get_error_message, arginfo_intltz_get_error_message ) - PHP_FE( intlcal_create_instance, ainfo_cal_create_instance ) - PHP_FE( intlcal_get_keyword_values_for_locale, ainfo_cal_get_keyword_values_for_locale ) - PHP_FE( intlcal_get_now, ainfo_cal_void ) - PHP_FE( intlcal_get_available_locales, ainfo_cal_void ) - PHP_FE( intlcal_get, ainfo_cal_field ) - PHP_FE( intlcal_get_time, ainfo_cal_only_cal ) - PHP_FE( intlcal_set_time, ainfo_cal_date ) - PHP_FE( intlcal_add, ainfo_cal_add ) - PHP_FE( intlcal_set_time_zone, ainfo_cal_set_time_zone ) - PHP_FE( intlcal_after, ainfo_cal_other_cal ) - PHP_FE( intlcal_before, ainfo_cal_other_cal ) - PHP_FE( intlcal_set, ainfo_cal_set ) - PHP_FE( intlcal_roll, ainfo_cal_roll ) - PHP_FE( intlcal_clear, ainfo_cal_clear ) - PHP_FE( intlcal_field_difference, ainfo_cal_field_difference ) - PHP_FE( intlcal_get_actual_maximum, ainfo_cal_field ) - PHP_FE( intlcal_get_actual_minimum, ainfo_cal_field ) - PHP_FE( intlcal_get_day_of_week_type, ainfo_cal_dow ) - PHP_FE( intlcal_get_first_day_of_week, ainfo_cal_only_cal ) - PHP_FE( intlcal_get_greatest_minimum, ainfo_cal_field ) - PHP_FE( intlcal_get_least_maximum, ainfo_cal_field ) - PHP_FE( intlcal_get_locale, ainfo_cal_get_locale ) - PHP_FE( intlcal_get_maximum, ainfo_cal_field ) - PHP_FE( intlcal_get_minimal_days_in_first_week, ainfo_cal_only_cal ) - PHP_FE( intlcal_get_minimum, ainfo_cal_field ) - PHP_FE( intlcal_get_time_zone, ainfo_cal_only_cal ) - PHP_FE( intlcal_get_type, ainfo_cal_only_cal ) - PHP_FE( intlcal_get_weekend_transition, ainfo_cal_dow ) - PHP_FE( intlcal_in_daylight_time, ainfo_cal_only_cal ) - PHP_FE( intlcal_is_equivalent_to, ainfo_cal_other_cal ) - PHP_FE( intlcal_is_lenient, ainfo_cal_only_cal ) - PHP_FE( intlcal_is_set, ainfo_cal_field ) - PHP_FE( intlcal_is_weekend, ainfo_cal_date_optional ) - PHP_FE( intlcal_set_first_day_of_week, ainfo_cal_dow ) - PHP_FE( intlcal_set_lenient, ainfo_cal_set_lenient ) - PHP_FE( intlcal_set_minimal_days_in_first_week, ainfo_cal_set_minimal_days_in_first_week ) - PHP_FE( intlcal_equals, ainfo_cal_other_cal ) - PHP_FE( intlcal_from_date_time, ainfo_cal_from_date_time ) - PHP_FE( intlcal_to_date_time, ainfo_cal_only_cal ) - PHP_FE( intlcal_get_repeated_wall_time_option, ainfo_cal_only_cal ) - PHP_FE( intlcal_get_skipped_wall_time_option, ainfo_cal_only_cal ) - PHP_FE( intlcal_set_repeated_wall_time_option, ainfo_cal_wall_time_option ) - PHP_FE( intlcal_set_skipped_wall_time_option, ainfo_cal_wall_time_option ) - PHP_FE( intlcal_get_error_code, ainfo_cal_only_cal ) - PHP_FE( intlcal_get_error_message, ainfo_cal_only_cal ) - - PHP_FE( intlgregcal_create_instance, ainfo_gregcal_create_instance ) - PHP_FE( intlgregcal_set_gregorian_change, ainfo_gregcal_set_gregorian_change ) - PHP_FE( intlgregcal_get_gregorian_change, ainfo_gregcal_only_gregcal ) - PHP_FE( intlgregcal_is_leap_year, ainfo_gregcal_is_leap_year ) + PHP_FE( intlcal_create_instance, arginfo_intlcal_create_instance ) + PHP_FE( intlcal_get_keyword_values_for_locale, arginfo_intlcal_get_keyword_values_for_locale ) + PHP_FE( intlcal_get_now, arginfo_intlcal_get_now ) + PHP_FE( intlcal_get_available_locales, arginfo_intlcal_get_available_locales ) + PHP_FE( intlcal_get, arginfo_intlcal_get ) + PHP_FE( intlcal_get_time, arginfo_intlcal_get_time ) + PHP_FE( intlcal_set_time, arginfo_intlcal_set_time ) + PHP_FE( intlcal_add, arginfo_intlcal_add ) + PHP_FE( intlcal_set_time_zone, arginfo_intlcal_set_time_zone ) + PHP_FE( intlcal_after, arginfo_intlcal_after ) + PHP_FE( intlcal_before, arginfo_intlcal_before ) + PHP_FE( intlcal_set, arginfo_intlcal_set ) + PHP_FE( intlcal_roll, arginfo_intlcal_roll ) + PHP_FE( intlcal_clear, arginfo_intlcal_clear ) + PHP_FE( intlcal_field_difference, arginfo_intlcal_field_difference ) + PHP_FE( intlcal_get_actual_maximum, arginfo_intlcal_get_actual_maximum ) + PHP_FE( intlcal_get_actual_minimum, arginfo_intlcal_get_actual_minimum ) + PHP_FE( intlcal_get_day_of_week_type, arginfo_intlcal_get_day_of_week_type ) + PHP_FE( intlcal_get_first_day_of_week, arginfo_intlcal_get_first_day_of_week ) + PHP_FE( intlcal_get_greatest_minimum, arginfo_intlcal_get_greatest_minimum ) + PHP_FE( intlcal_get_least_maximum, arginfo_intlcal_get_least_maximum ) + PHP_FE( intlcal_get_locale, arginfo_intlcal_get_locale ) + PHP_FE( intlcal_get_maximum, arginfo_intlcal_get_maximum ) + PHP_FE( intlcal_get_minimal_days_in_first_week, arginfo_intlcal_get_minimal_days_in_first_week ) + PHP_FE( intlcal_get_minimum, arginfo_intlcal_get_minimum ) + PHP_FE( intlcal_get_time_zone, arginfo_intlcal_get_time_zone ) + PHP_FE( intlcal_get_type, arginfo_intlcal_get_type ) + PHP_FE( intlcal_get_weekend_transition, arginfo_intlcal_get_weekend_transition ) + PHP_FE( intlcal_in_daylight_time, arginfo_intlcal_in_daylight_time ) + PHP_FE( intlcal_is_equivalent_to, arginfo_intlcal_is_equivalent_to ) + PHP_FE( intlcal_is_lenient, arginfo_intlcal_is_lenient ) + PHP_FE( intlcal_is_set, arginfo_intlcal_is_set ) + PHP_FE( intlcal_is_weekend, arginfo_intlcal_is_weekend ) + PHP_FE( intlcal_set_first_day_of_week, arginfo_intlcal_set_first_day_of_week ) + PHP_FE( intlcal_set_lenient, arginfo_intlcal_set_lenient ) + PHP_FE( intlcal_set_minimal_days_in_first_week, arginfo_intlcal_set_minimal_days_in_first_week ) + PHP_FE( intlcal_equals, arginfo_intlcal_equals ) + PHP_FE( intlcal_from_date_time, arginfo_intlcal_from_date_time ) + PHP_FE( intlcal_to_date_time, arginfo_intlcal_to_date_time ) + PHP_FE( intlcal_get_repeated_wall_time_option, arginfo_intlcal_get_repeated_wall_time_option ) + PHP_FE( intlcal_get_skipped_wall_time_option, arginfo_intlcal_get_skipped_wall_time_option ) + PHP_FE( intlcal_set_repeated_wall_time_option, arginfo_intlcal_set_repeated_wall_time_option ) + PHP_FE( intlcal_set_skipped_wall_time_option, arginfo_intlcal_set_skipped_wall_time_option ) + PHP_FE( intlcal_get_error_code, arginfo_intlcal_get_error_code ) + PHP_FE( intlcal_get_error_message, arginfo_intlcal_get_error_message ) + + PHP_FE( intlgregcal_create_instance, arginfo_intlgregcal_create_instance ) + PHP_FE( intlgregcal_set_gregorian_change, arginfo_intlgregcal_set_gregorian_change ) + PHP_FE( intlgregcal_get_gregorian_change, arginfo_intlgregcal_get_gregorian_change ) + PHP_FE( intlgregcal_is_leap_year, arginfo_intlgregcal_is_leap_year ) /* common functions */ PHP_FE( intl_get_error_code, intl_0_args ) |