summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat/msgformat_class.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/msgformat/msgformat_class.c')
-rwxr-xr-xext/intl/msgformat/msgformat_class.c73
1 files changed, 53 insertions, 20 deletions
diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c
index 853cbdb78a..63af20b5eb 100755
--- a/ext/intl/msgformat/msgformat_class.c
+++ b/ext/intl/msgformat/msgformat_class.c
@@ -26,9 +26,9 @@
zend_class_entry *MessageFormatter_ce_ptr = NULL;
-/////////////////////////////////////////////////////////////////////////////
-// Auxiliary functions needed by objects of 'MessageFormatter' class
-/////////////////////////////////////////////////////////////////////////////
+/*
+ * Auxiliary functions needed by objects of 'MessageFormatter' class
+ */
/* {{{ MessageFormatter_objects_dtor */
static void MessageFormatter_object_dtor(void *object, zend_object_handle handle TSRMLS_DC )
@@ -72,26 +72,59 @@ zend_object_value MessageFormatter_object_create(zend_class_entry *ce TSRMLS_DC)
}
/* }}} */
-/////////////////////////////////////////////////////////////////////////////
-// 'MessageFormatter' class registration structures & functions
-/////////////////////////////////////////////////////////////////////////////
+/*
+ * 'MessageFormatter' class registration structures & functions
+ */
+
+/* {{{ arginfo */
+static
+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()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_messageformatter_geterrormessage, 0)
+ZEND_END_ARG_INFO()
+
+static
+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()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_format, 0, 0, 1)
+ ZEND_ARG_INFO(0, args)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_setpattern, 0, 0, 1)
+ ZEND_ARG_INFO(0, pattern)
+ZEND_END_ARG_INFO()
+
+static
+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 function_entry MessageFormatter_class_functions[] = {
- PHP_ME( MessageFormatter, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
- ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), NULL )
- ZEND_FENTRY( formatMessage, ZEND_FN( msgfmt_format_message ), NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- PHP_NAMED_FE( parse, ZEND_FN( msgfmt_parse ), NULL )
- ZEND_FENTRY( parseMessage, ZEND_FN( msgfmt_parse_message ), NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- PHP_NAMED_FE( setPattern, ZEND_FN( msgfmt_set_pattern ), NULL )
- PHP_NAMED_FE( getPattern, ZEND_FN( msgfmt_get_pattern ), NULL )
- PHP_NAMED_FE( getLocale, ZEND_FN( msgfmt_get_locale ), NULL )
- PHP_NAMED_FE( getErrorCode, ZEND_FN( msgfmt_get_error_code ), NULL )
- PHP_NAMED_FE( getErrorMessage, ZEND_FN( msgfmt_get_error_message ), NULL )
+ PHP_ME( MessageFormatter, __construct, arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ 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 )
{ NULL, NULL, NULL }
};
/* }}} */
@@ -103,12 +136,12 @@ void msgformat_register_class( TSRMLS_D )
{
zend_class_entry ce;
- // Create and register 'MessageFormatter' class.
+ /* Create and register 'MessageFormatter' class. */
INIT_CLASS_ENTRY( ce, "MessageFormatter", MessageFormatter_class_functions );
ce.create_object = MessageFormatter_object_create;
MessageFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
- // Declare 'MessageFormatter' class properties.
+ /* Declare 'MessageFormatter' class properties. */
if( !MessageFormatter_ce_ptr )
{
zend_error(E_ERROR, "Failed to register MessageFormatter class");