summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-02-04 13:08:06 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-02-04 13:08:06 +0100
commitfe7761b0ad657812796a2d746753e9e704d2156a (patch)
tree295617d92f1d086856b4779297264ded26c369f0
parentf6ddcfa6f3c15836b8a9ce6be1a52f972b4ea108 (diff)
downloadphp-git-fe7761b0ad657812796a2d746753e9e704d2156a.tar.gz
Add stubs for IntlDateFormatter & MessageFormatter
Closes GH-4812
-rw-r--r--ext/intl/dateformat/dateformat.stub.php138
-rw-r--r--ext/intl/dateformat/dateformat_arginfo.h161
-rw-r--r--ext/intl/dateformat/dateformat_attr.c4
-rw-r--r--ext/intl/dateformat/dateformat_class.c89
-rw-r--r--ext/intl/msgformat/msgformat.stub.php56
-rw-r--r--ext/intl/msgformat/msgformat_arginfo.h87
-rw-r--r--ext/intl/msgformat/msgformat_class.c51
-rw-r--r--ext/intl/php_intl.c116
-rw-r--r--ext/intl/tests/dateformat_get_locale.phpt2
9 files changed, 495 insertions, 209 deletions
diff --git a/ext/intl/dateformat/dateformat.stub.php b/ext/intl/dateformat/dateformat.stub.php
new file mode 100644
index 0000000000..adf8f463f8
--- /dev/null
+++ b/ext/intl/dateformat/dateformat.stub.php
@@ -0,0 +1,138 @@
+<?php
+
+class IntlDateFormatter
+{
+ /**
+ * @param IntlTimeZone|DateTimeZone|string|null $timezone
+ * @param IntlCalendar|int|null $calendar
+ */
+ public function __construct(?string $locale, int $datetype, int $timetype, $timezone = null, $calendar = null, string $pattern = "") {}
+
+ /**
+ * @param IntlTimeZone|DateTimeZone|string|null $timezone
+ * @param IntlCalendar|int|null $calendar
+ * @return IntlDateFormatter|null
+ */
+ public static function create(?string $locale, int $datetype, int $timetype, $timezone = null, $calendar = null, string $pattern = "") {}
+
+ /** @return int|false */
+ public function getDateType() {}
+
+ /** @return int|false */
+ public function getTimeType() {}
+
+ /** @return int|false */
+ public function getCalendar() {}
+
+ /**
+ * @param IntlCalendar|int|null $which
+ * @return bool
+ */
+ public function setCalendar($which) {}
+
+ /** @return string|false */
+ public function getTimeZoneId() {}
+
+ /** @return IntlCalendar|null|false */
+ public function getCalendarObject() {}
+
+ /** @return IntlTimeZone|false */
+ public function getTimeZone() {}
+
+ /**
+ * @param IntlTimeZone|DateTimeZone|string|null $zone
+ * @return ?bool
+ */
+ public function setTimeZone($zone) {}
+
+ /** @return bool */
+ public function setPattern(string $pattern) {}
+
+ /** @return string|false */
+ public function getPattern() {}
+
+ /** @return string|false */
+ public function getLocale(int $which = UNKNOWN) {}
+
+ /** @return void */
+ public function setLenient(bool $lenient) {}
+
+ /** @return bool */
+ public function isLenient() {}
+
+ /**
+ * @param array|int $value
+ * @return string|false
+ */
+ public function format($value) {}
+
+ /**
+ * @param IntlCalendar|DateTime $object
+ * @param array|int|string|null $format
+ * @return string|false
+ */
+ public static function formatObject($object, $format = null, ?string $locale = null) {}
+
+ /** @return int|float|false */
+ public function parse(string $value, &$position = null) {}
+
+ /** @return array|false */
+ public function localtime(string $value, &$position = null) {}
+
+ /** @return int */
+ public function getErrorCode() {}
+
+ /** @return string */
+ public function getErrorMessage() {}
+}
+
+/**
+ * @param IntlTimeZone|DateTimeZone|string|null $timezone
+ * @param IntlCalendar|int|null $calendar
+ */
+function datefmt_create(?string $locale, int $datetype, int $timetype, $timezone = null, $calendar = null, string $pattern = ""): ?IntlDateFormatter {}
+
+function datefmt_get_datetype(IntlDateFormatter $df): int|false {}
+
+function datefmt_get_timetype(IntlDateFormatter $df): int|false {}
+
+function datefmt_get_calendar(IntlDateFormatter $df): int|false {}
+
+/** @param IntlCalendar|int|null $which */
+function datefmt_set_calendar(IntlDateFormatter $df, $which): bool {}
+
+function datefmt_get_timezone_id(IntlDateFormatter $df): string|false {}
+
+function datefmt_get_calendar_object(IntlDateFormatter $df): IntlCalendar|false|null {}
+
+function datefmt_get_timezone(IntlDateFormatter $df): IntlTimeZone|false {}
+
+/** @param IntlTimeZone|DateTimeZone|string|null $zone */
+function datefmt_set_timezone(IntlDateFormatter $df, $zone): ?bool {}
+
+function datefmt_set_pattern(IntlDateFormatter $df, string $pattern): bool {}
+
+function datefmt_get_pattern(IntlDateFormatter $df): string|false {}
+
+function datefmt_get_locale(IntlDateFormatter $df, int $which = UNKNOWN): string|false {}
+
+function datefmt_set_lenient(IntlDateFormatter $df, bool $lenient): void {}
+
+function datefmt_is_lenient(IntlDateFormatter $df): bool {}
+
+/** @param mixed $value */
+function datefmt_format(IntlDateFormatter $df, $value): string|false {}
+
+/**
+ * @param IntlCalendar|DateTimeInterface $object
+ * @param array|int|string|null $format
+ */
+function datefmt_format_object($object, $format = null, ?string $locale = null): string|false {}
+
+function datefmt_parse(IntlDateFormatter $df, string $value, &$position = null): int|float|false {}
+
+function datefmt_localtime(IntlDateFormatter $df, string $value, &$position = null): array|false {}
+
+function datefmt_get_error_code(IntlDateFormatter $df): int {}
+
+function datefmt_get_error_message(IntlDateFormatter $df): string {}
diff --git a/ext/intl/dateformat/dateformat_arginfo.h b/ext/intl/dateformat/dateformat_arginfo.h
new file mode 100644
index 0000000000..6d86c9cde8
--- /dev/null
+++ b/ext/intl/dateformat/dateformat_arginfo.h
@@ -0,0 +1,161 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 3)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, datetype, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, timetype, IS_LONG, 0)
+ ZEND_ARG_INFO(0, timezone)
+ ZEND_ARG_INFO(0, calendar)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_IntlDateFormatter_create arginfo_class_IntlDateFormatter___construct
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_getDateType, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_IntlDateFormatter_getTimeType arginfo_class_IntlDateFormatter_getDateType
+
+#define arginfo_class_IntlDateFormatter_getCalendar arginfo_class_IntlDateFormatter_getDateType
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_setCalendar, 0, 0, 1)
+ ZEND_ARG_INFO(0, which)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_IntlDateFormatter_getTimeZoneId arginfo_class_IntlDateFormatter_getDateType
+
+#define arginfo_class_IntlDateFormatter_getCalendarObject arginfo_class_IntlDateFormatter_getDateType
+
+#define arginfo_class_IntlDateFormatter_getTimeZone arginfo_class_IntlDateFormatter_getDateType
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_setTimeZone, 0, 0, 1)
+ ZEND_ARG_INFO(0, zone)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_setPattern, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_IntlDateFormatter_getPattern arginfo_class_IntlDateFormatter_getDateType
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_getLocale, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, which, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_setLenient, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, lenient, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_IntlDateFormatter_isLenient arginfo_class_IntlDateFormatter_getDateType
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_format, 0, 0, 1)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_formatObject, 0, 0, 1)
+ ZEND_ARG_INFO(0, object)
+ ZEND_ARG_INFO(0, format)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_parse, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_INFO(1, position)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_IntlDateFormatter_localtime arginfo_class_IntlDateFormatter_parse
+
+#define arginfo_class_IntlDateFormatter_getErrorCode arginfo_class_IntlDateFormatter_getDateType
+
+#define arginfo_class_IntlDateFormatter_getErrorMessage arginfo_class_IntlDateFormatter_getDateType
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_datefmt_create, 0, 3, IntlDateFormatter, 1)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, datetype, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, timetype, IS_LONG, 0)
+ ZEND_ARG_INFO(0, timezone)
+ ZEND_ARG_INFO(0, calendar)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_get_datetype, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_datefmt_get_timetype arginfo_datefmt_get_datetype
+
+#define arginfo_datefmt_get_calendar arginfo_datefmt_get_datetype
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_set_calendar, 0, 2, _IS_BOOL, 0)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ ZEND_ARG_INFO(0, which)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_get_timezone_id, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_datefmt_get_calendar_object, 0, 1, IntlCalendar, MAY_BE_FALSE|MAY_BE_NULL)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_datefmt_get_timezone, 0, 1, IntlTimeZone, MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_set_timezone, 0, 2, _IS_BOOL, 1)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ ZEND_ARG_INFO(0, zone)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_set_pattern, 0, 2, _IS_BOOL, 0)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_datefmt_get_pattern arginfo_datefmt_get_timezone_id
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_get_locale, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ ZEND_ARG_TYPE_INFO(0, which, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_set_lenient, 0, 2, IS_VOID, 0)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ ZEND_ARG_TYPE_INFO(0, lenient, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_is_lenient, 0, 1, _IS_BOOL, 0)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_format_object, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_INFO(0, object)
+ ZEND_ARG_INFO(0, format)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_parse, 0, 2, MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_INFO(1, position)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_localtime, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ ZEND_ARG_INFO(1, position)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_get_error_code, 0, 1, IS_LONG, 0)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_datefmt_get_error_message, 0, 1, IS_STRING, 0)
+ ZEND_ARG_OBJ_INFO(0, df, IntlDateFormatter, 0)
+ZEND_END_ARG_INFO()
diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c
index 4ce478c1fc..6145983d58 100644
--- a/ext/intl/dateformat/dateformat_attr.c
+++ b/ext/intl/dateformat/dateformat_attr.c
@@ -206,9 +206,9 @@ PHP_FUNCTION( datefmt_is_lenient )
}
/* }}} */
-/* {{{ proto string IntlDateFormatter::setLenient()
+/* {{{ proto void IntlDateFormatter::setLenient()
* Set formatter lenient. }}} */
-/* {{{ proto string datefmt_setLenient(IntlDateFormatter $mf)
+/* {{{ proto void datefmt_setLenient(IntlDateFormatter $mf)
* Set formatter lenient.
*/
PHP_FUNCTION( datefmt_set_lenient )
diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c
index 49dcf43b2f..58331053db 100644
--- a/ext/intl/dateformat/dateformat_class.c
+++ b/ext/intl/dateformat/dateformat_class.c
@@ -22,6 +22,7 @@
#include "dateformat.h"
#include "dateformat_attr.h"
#include "dateformat_attrcpp.h"
+#include "dateformat_arginfo.h"
#include <zend_exceptions.h>
@@ -106,77 +107,31 @@ zend_object *IntlDateFormatter_object_clone(zend_object *object)
* 'IntlDateFormatter' class registration structures & functions
*/
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(1, position)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_format, 0, 0, 0)
- ZEND_ARG_INFO(0, args)
- ZEND_ARG_INFO(0, array)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_format_object, 0, 0, 1)
- ZEND_ARG_INFO(0, object)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, locale)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_intldateformatter_getdatetype, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_settimezoneid, 0, 0, 1)
- ZEND_ARG_INFO(0, zone)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setpattern, 0, 0, 1)
- ZEND_ARG_INFO(0, pattern)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setlenient, 0, 0, 1)
- ZEND_ARG_INFO(0, lenient)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setcalendar, 0, 0, 1)
- ZEND_ARG_INFO(0, which)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter___construct, 0, 0, 3)
- ZEND_ARG_INFO(0, locale)
- ZEND_ARG_INFO(0, datetype)
- ZEND_ARG_INFO(0, timetype)
- ZEND_ARG_INFO(0, timezone)
- ZEND_ARG_INFO(0, calendar)
- ZEND_ARG_INFO(0, pattern)
-ZEND_END_ARG_INFO()
-/* }}} */
-
/* {{{ IntlDateFormatter_class_functions
* Every 'IntlDateFormatter' class method has an entry in this table
*/
static const zend_function_entry IntlDateFormatter_class_functions[] = {
- PHP_ME( IntlDateFormatter, __construct, arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC )
- ZEND_FENTRY( create, ZEND_FN( datefmt_create ), arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( getCalendar, ZEND_FN( datefmt_get_calendar ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( getCalendarObject, ZEND_FN( datefmt_get_calendar_object ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( setCalendar, ZEND_FN( datefmt_set_calendar ), arginfo_intldateformatter_setcalendar )
- PHP_NAMED_FE( getTimeZoneId, ZEND_FN( datefmt_get_timezone_id ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( getTimeZone, ZEND_FN( datefmt_get_timezone ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( setTimeZone, ZEND_FN( datefmt_set_timezone ), arginfo_intldateformatter_settimezoneid )
- PHP_NAMED_FE( setPattern, ZEND_FN( datefmt_set_pattern ), arginfo_intldateformatter_setpattern )
- PHP_NAMED_FE( getPattern, ZEND_FN( datefmt_get_pattern ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( getLocale, ZEND_FN( datefmt_get_locale ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( setLenient, ZEND_FN( datefmt_set_lenient ), arginfo_intldateformatter_setlenient )
- PHP_NAMED_FE( isLenient, ZEND_FN( datefmt_is_lenient ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( format, ZEND_FN( datefmt_format ), arginfo_intldateformatter_format )
- PHP_ME_MAPPING( formatObject, datefmt_format_object, arginfo_intldateformatter_format_object, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
- PHP_NAMED_FE( parse, ZEND_FN( datefmt_parse), datefmt_parse_args )
- PHP_NAMED_FE( localtime, ZEND_FN( datefmt_localtime ), datefmt_parse_args )
- PHP_NAMED_FE( getErrorCode, ZEND_FN( datefmt_get_error_code ), arginfo_intldateformatter_getdatetype )
- PHP_NAMED_FE( getErrorMessage, ZEND_FN( datefmt_get_error_message ), arginfo_intldateformatter_getdatetype )
+ PHP_ME( IntlDateFormatter, __construct, arginfo_class_IntlDateFormatter___construct, ZEND_ACC_PUBLIC )
+ ZEND_FENTRY( create, ZEND_FN( datefmt_create ), arginfo_class_IntlDateFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
+ PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_class_IntlDateFormatter_getDateType )
+ PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), arginfo_class_IntlDateFormatter_getTimeType )
+ PHP_NAMED_FE( getCalendar, ZEND_FN( datefmt_get_calendar ), arginfo_class_IntlDateFormatter_getCalendar )
+ PHP_NAMED_FE( getCalendarObject, ZEND_FN( datefmt_get_calendar_object ), arginfo_class_IntlDateFormatter_getCalendarObject )
+ PHP_NAMED_FE( setCalendar, ZEND_FN( datefmt_set_calendar ), arginfo_class_IntlDateFormatter_setCalendar )
+ PHP_NAMED_FE( getTimeZoneId, ZEND_FN( datefmt_get_timezone_id ), arginfo_class_IntlDateFormatter_getTimeZoneId )
+ PHP_NAMED_FE( getTimeZone, ZEND_FN( datefmt_get_timezone ), arginfo_class_IntlDateFormatter_getTimeZone )
+ PHP_NAMED_FE( setTimeZone, ZEND_FN( datefmt_set_timezone ), arginfo_class_IntlDateFormatter_setTimeZone )
+ PHP_NAMED_FE( setPattern, ZEND_FN( datefmt_set_pattern ), arginfo_class_IntlDateFormatter_setPattern )
+ PHP_NAMED_FE( getPattern, ZEND_FN( datefmt_get_pattern ), arginfo_class_IntlDateFormatter_getPattern )
+ PHP_NAMED_FE( getLocale, ZEND_FN( datefmt_get_locale ), arginfo_class_IntlDateFormatter_getLocale )
+ PHP_NAMED_FE( setLenient, ZEND_FN( datefmt_set_lenient ), arginfo_class_IntlDateFormatter_setLenient )
+ PHP_NAMED_FE( isLenient, ZEND_FN( datefmt_is_lenient ), arginfo_class_IntlDateFormatter_isLenient )
+ PHP_NAMED_FE( format, ZEND_FN( datefmt_format ), arginfo_class_IntlDateFormatter_format )
+ PHP_ME_MAPPING( formatObject, datefmt_format_object, arginfo_class_IntlDateFormatter_formatObject, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ PHP_NAMED_FE( parse, ZEND_FN( datefmt_parse), arginfo_class_IntlDateFormatter_parse )
+ PHP_NAMED_FE( localtime, ZEND_FN( datefmt_localtime ), arginfo_class_IntlDateFormatter_localtime )
+ PHP_NAMED_FE( getErrorCode, ZEND_FN( datefmt_get_error_code ), arginfo_class_IntlDateFormatter_getErrorCode )
+ PHP_NAMED_FE( getErrorMessage, ZEND_FN( datefmt_get_error_message ), arginfo_class_IntlDateFormatter_getErrorMessage )
PHP_FE_END
};
/* }}} */
diff --git a/ext/intl/msgformat/msgformat.stub.php b/ext/intl/msgformat/msgformat.stub.php
new file mode 100644
index 0000000000..65d9b5ef1e
--- /dev/null
+++ b/ext/intl/msgformat/msgformat.stub.php
@@ -0,0 +1,56 @@
+<?php
+
+class MessageFormatter
+{
+ public function __construct(string $locale, string $pattern) {}
+
+ /** @return MessageFormatter|null */
+ public static function create(string $locale, string $pattern) {}
+
+ /** @return string|false */
+ public function format(array $args) {}
+
+ /** @return string|false */
+ public static function formatMessage(string $locale, string $pattern, array $args) {}
+
+ /** @return array|false */
+ public function parse(string $value) {}
+
+ /** @return array|false */
+ public static function parseMessage(string $locale, string $pattern, string $source) {}
+
+ /** @return bool */
+ public function setPattern(string $pattern) {}
+
+ /** @return string|false */
+ public function getPattern() {}
+
+ /** @return string */
+ public function getLocale() {}
+
+ /** @return int */
+ public function getErrorCode() {}
+
+ /** @return string */
+ public function getErrorMessage() {}
+}
+
+function msgfmt_create(string $locale, string $pattern): ?MessageFormatter {}
+
+function msgfmt_format(MessageFormatter $fmt, array $args): string|false {}
+
+function msgfmt_format_message(string $locale, string $pattern, array $args): string|false {}
+
+function msgfmt_parse(MessageFormatter $fmt, string $value): array|false {}
+
+function msgfmt_parse_message(string $locale, string $pattern, string $source): array|false {}
+
+function msgfmt_set_pattern(MessageFormatter $fmt, string $pattern): bool {}
+
+function msgfmt_get_pattern(MessageFormatter $fmt): string|false {}
+
+function msgfmt_get_locale(MessageFormatter $fmt): string {}
+
+function msgfmt_get_error_code(MessageFormatter $fmt): int {}
+
+function msgfmt_get_error_message(MessageFormatter $fmt): string {}
diff --git a/ext/intl/msgformat/msgformat_arginfo.h b/ext/intl/msgformat/msgformat_arginfo.h
new file mode 100644
index 0000000000..e03dbffc73
--- /dev/null
+++ b/ext/intl/msgformat/msgformat_arginfo.h
@@ -0,0 +1,87 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter___construct, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_MessageFormatter_create arginfo_class_MessageFormatter___construct
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter_format, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter_formatMessage, 0, 0, 3)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter_parse, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter_parseMessage, 0, 0, 3)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter_setPattern, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MessageFormatter_getPattern, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_MessageFormatter_getLocale arginfo_class_MessageFormatter_getPattern
+
+#define arginfo_class_MessageFormatter_getErrorCode arginfo_class_MessageFormatter_getPattern
+
+#define arginfo_class_MessageFormatter_getErrorMessage arginfo_class_MessageFormatter_getPattern
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_msgfmt_create, 0, 2, MessageFormatter, 1)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0)
+ ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_format_message, 0, 3, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_parse, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0)
+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_parse_message, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msgfmt_set_pattern, 0, 2, _IS_BOOL, 0)
+ ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0)
+ ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_msgfmt_get_pattern, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msgfmt_get_locale, 0, 1, IS_STRING, 0)
+ ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_msgfmt_get_error_code, 0, 1, IS_LONG, 0)
+ ZEND_ARG_OBJ_INFO(0, fmt, MessageFormatter, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_msgfmt_get_error_message arginfo_msgfmt_get_locale
diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c
index 2ca12b7819..2adbcbbfac 100644
--- a/ext/intl/msgformat/msgformat_class.c
+++ b/ext/intl/msgformat/msgformat_class.c
@@ -21,6 +21,7 @@
#include "msgformat_parse.h"
#include "msgformat.h"
#include "msgformat_attr.h"
+#include "msgformat_arginfo.h"
#include <zend_exceptions.h>
@@ -91,49 +92,21 @@ zend_object *MessageFormatter_object_clone(zend_object *object)
* 'MessageFormatter' class registration structures & functions
*/
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter___construct, 0, 0, 2)
- ZEND_ARG_INFO(0, locale)
- ZEND_ARG_INFO(0, pattern)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_messageformatter_geterrormessage, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_formatmessage, 0, 0, 3)
- ZEND_ARG_INFO(0, locale)
- ZEND_ARG_INFO(0, pattern)
- ZEND_ARG_INFO(0, args)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_format, 0, 0, 1)
- ZEND_ARG_INFO(0, args)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_setpattern, 0, 0, 1)
- ZEND_ARG_INFO(0, pattern)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_parse, 0, 0, 1)
- ZEND_ARG_INFO(0, source)
-ZEND_END_ARG_INFO()
-/* }}} */
-
/* {{{ MessageFormatter_class_functions
* Every 'MessageFormatter' class method has an entry in this table
*/
static const zend_function_entry MessageFormatter_class_functions[] = {
- PHP_ME( MessageFormatter, __construct, arginfo_messageformatter___construct, ZEND_ACC_PUBLIC )
- ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), arginfo_messageformatter_format )
- ZEND_FENTRY( formatMessage, ZEND_FN( msgfmt_format_message ), arginfo_messageformatter_formatmessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- PHP_NAMED_FE( parse, ZEND_FN( msgfmt_parse ), arginfo_messageformatter_parse )
- ZEND_FENTRY( parseMessage, ZEND_FN( msgfmt_parse_message ), arginfo_messageformatter_formatmessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- PHP_NAMED_FE( setPattern, ZEND_FN( msgfmt_set_pattern ), arginfo_messageformatter_setpattern )
- PHP_NAMED_FE( getPattern, ZEND_FN( msgfmt_get_pattern ), arginfo_messageformatter_geterrormessage )
- PHP_NAMED_FE( getLocale, ZEND_FN( msgfmt_get_locale ), arginfo_messageformatter_geterrormessage )
- PHP_NAMED_FE( getErrorCode, ZEND_FN( msgfmt_get_error_code ), arginfo_messageformatter_geterrormessage )
- PHP_NAMED_FE( getErrorMessage, ZEND_FN( msgfmt_get_error_message ), arginfo_messageformatter_geterrormessage )
+ PHP_ME( MessageFormatter, __construct, arginfo_class_MessageFormatter___construct, ZEND_ACC_PUBLIC )
+ ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), arginfo_class_MessageFormatter_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
+ PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), arginfo_class_MessageFormatter_format )
+ ZEND_FENTRY( formatMessage, ZEND_FN( msgfmt_format_message ), arginfo_class_MessageFormatter_formatMessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
+ PHP_NAMED_FE( parse, ZEND_FN( msgfmt_parse ), arginfo_class_MessageFormatter_parse )
+ ZEND_FENTRY( parseMessage, ZEND_FN( msgfmt_parse_message ), arginfo_class_MessageFormatter_parseMessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
+ PHP_NAMED_FE( setPattern, ZEND_FN( msgfmt_set_pattern ), arginfo_class_MessageFormatter_setPattern )
+ PHP_NAMED_FE( getPattern, ZEND_FN( msgfmt_get_pattern ), arginfo_class_MessageFormatter_getPattern )
+ PHP_NAMED_FE( getLocale, ZEND_FN( msgfmt_get_locale ), arginfo_class_MessageFormatter_getLocale )
+ PHP_NAMED_FE( getErrorCode, ZEND_FN( msgfmt_get_error_code ), arginfo_class_MessageFormatter_getErrorCode )
+ PHP_NAMED_FE( getErrorMessage, ZEND_FN( msgfmt_get_error_message ), arginfo_class_MessageFormatter_getErrorMessage )
PHP_FE_END
};
/* }}} */
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index 9d963449a5..872d5271bc 100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
@@ -68,6 +68,7 @@
#include "dateformat/dateformat_format_object.h"
#include "dateformat/dateformat_parse.h"
#include "dateformat/dateformat_data.h"
+#include "dateformat/dateformat_arginfo.h"
#include "resourcebundle/resourcebundle_class.h"
#include "resourcebundle/resourcebundle_arginfo.h"
@@ -97,6 +98,7 @@
# include "spoofchecker/spoofchecker_main.h"
#include "msgformat/msgformat.h"
+#include "msgformat/msgformat_arginfo.h"
#include "common/common_error.h"
#include "common/common_enum.h"
@@ -177,12 +179,6 @@ ZEND_END_ARG_INFO()
#define intl_0_args collator_static_0_args
#define intl_1_arg collator_static_1_arg
-ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 2)
- ZEND_ARG_INFO(0, formatter)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(1, position)
-ZEND_END_ARG_INFO()
-
ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_create, 0, 0, 2)
ZEND_ARG_INFO(0, locale)
ZEND_ARG_INFO(0, style)
@@ -232,86 +228,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_get_locale, 0, 0, 1)
ZEND_ARG_INFO(0, type)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_create, 0, 0, 2)
- ZEND_ARG_INFO(0, locale)
- ZEND_ARG_INFO(0, pattern)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_error_code, 0, 0, 1)
- ZEND_ARG_INFO(0, nf)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_error_message, 0, 0, 1)
- ZEND_ARG_INFO(0, coll)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_format, 0, 0, 2)
- ZEND_ARG_INFO(0, nf)
- ZEND_ARG_INFO(0, args)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_format_message, 0, 0, 3)
- ZEND_ARG_INFO(0, locale)
- ZEND_ARG_INFO(0, pattern)
- ZEND_ARG_INFO(0, args)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_parse, 0, 0, 2)
- ZEND_ARG_INFO(0, nf)
- ZEND_ARG_INFO(0, source)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_parse_message, 0, 0, 3)
- ZEND_ARG_INFO(0, locale)
- ZEND_ARG_INFO(0, pattern)
- ZEND_ARG_INFO(0, source)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_set_pattern, 0, 0, 2)
- ZEND_ARG_INFO(0, mf)
- ZEND_ARG_INFO(0, pattern)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_locale, 0, 0, 1)
- ZEND_ARG_INFO(0, mf)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_pattern, 0, 0, 2)
- ZEND_ARG_INFO(0, mf)
- ZEND_ARG_INFO(0, pattern)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_timezone, 0, 0, 2)
- ZEND_ARG_INFO(0, mf)
- ZEND_ARG_INFO(0, timezone)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_calendar, 0, 0, 2)
- ZEND_ARG_INFO(0, mf)
- ZEND_ARG_INFO(0, calendar)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_format, 0, 0, 0)
- ZEND_ARG_INFO(0, args)
- ZEND_ARG_INFO(0, array)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_format_object, 0, 0, 1)
- ZEND_ARG_INFO(0, object)
- ZEND_ARG_INFO(0, format)
- ZEND_ARG_INFO(0, locale)
-ZEND_END_ARG_INFO()
-
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_create, 0, 0, 3)
- ZEND_ARG_INFO(0, locale)
- ZEND_ARG_INFO(0, date_type)
- ZEND_ARG_INFO(0, time_type)
- ZEND_ARG_INFO(0, timezone_str)
- ZEND_ARG_INFO(0, calendar)
- ZEND_ARG_INFO(0, pattern)
-ZEND_END_ARG_INFO()
-
ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_void, 0, 0, 0 )
ZEND_END_ARG_INFO()
@@ -551,25 +467,25 @@ static const zend_function_entry intl_functions[] = {
/* 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_get_calendar_object, arginfo_msgfmt_get_locale )
+ PHP_FE( datefmt_get_datetype, arginfo_datefmt_get_datetype )
+ PHP_FE( datefmt_get_timetype, arginfo_datefmt_get_timetype )
+ PHP_FE( datefmt_get_calendar, arginfo_datefmt_get_calendar )
+ PHP_FE( datefmt_get_calendar_object, arginfo_datefmt_get_calendar_object )
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_get_timezone, arginfo_msgfmt_get_locale )
+ PHP_FE( datefmt_get_locale, arginfo_datefmt_get_locale )
+ PHP_FE( datefmt_get_timezone_id, arginfo_datefmt_get_timezone_id )
+ PHP_FE( datefmt_get_timezone, arginfo_datefmt_get_timezone )
PHP_FE( datefmt_set_timezone, arginfo_datefmt_set_timezone )
- PHP_FE( datefmt_get_pattern, arginfo_msgfmt_get_locale )
+ PHP_FE( datefmt_get_pattern, arginfo_datefmt_get_pattern )
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_is_lenient, arginfo_datefmt_is_lenient )
+ PHP_FE( datefmt_set_lenient, arginfo_datefmt_set_lenient )
PHP_FE( datefmt_format, arginfo_datefmt_format )
PHP_FE( datefmt_format_object, arginfo_datefmt_format_object )
- 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 )
+ PHP_FE( datefmt_parse, arginfo_datefmt_parse )
+ PHP_FE( datefmt_localtime , arginfo_datefmt_localtime )
+ PHP_FE( datefmt_get_error_code, arginfo_datefmt_get_error_code )
+ PHP_FE( datefmt_get_error_message, arginfo_datefmt_get_error_message )
/* grapheme functions */
PHP_FE( grapheme_strlen, arginfo_grapheme_strlen )
diff --git a/ext/intl/tests/dateformat_get_locale.phpt b/ext/intl/tests/dateformat_get_locale.phpt
index 2078c7b6db..c5b6f8c300 100644
--- a/ext/intl/tests/dateformat_get_locale.phpt
+++ b/ext/intl/tests/dateformat_get_locale.phpt
@@ -1,5 +1,5 @@
--TEST--
-datefmt_get_locale_code()
+datefmt_get_locale()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) die('skip');
if (PHP_INT_SIZE != 8) die('skip 64-bit only');