--- /dev/null
+<?php
+
+function grapheme_strlen(string $input): int|false|null {}
+
+function grapheme_strpos(string $haystack, string $needle, int $offset = 0): int|false {}
+
+function grapheme_stripos(string $haystack, string $needle, int $offset = 0): int|false {}
+
+function grapheme_strrpos(string $haystack, string $needle, int $offset = 0): int|false {}
+
+function grapheme_strripos(string $haystack, string $needle, int $offset = 0): int|false {}
+
+function grapheme_substr(string $string, int $start, ?int $length = 0): string|false {}
+
+function grapheme_strstr(string $haystack, string $needle, bool $before_needle = false): string|false {}
+
+function grapheme_stristr(string $haystack, string $needle, bool $before_needle = false): string|false {}
+
+function grapheme_extract(string $haystack, int $size, int $extract_type = GRAPHEME_EXTR_COUNT, int $start = 0, &$next = null): string|false {}
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE|MAY_BE_NULL)
+ ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strpos, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_grapheme_stripos arginfo_grapheme_strpos
+
+#define arginfo_grapheme_strrpos arginfo_grapheme_strpos
+
+#define arginfo_grapheme_strripos arginfo_grapheme_strpos
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_substr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 1)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_strstr, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, needle, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, before_needle, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_grapheme_stristr arginfo_grapheme_strstr
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_grapheme_extract, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, haystack, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, extract_type, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, start, IS_LONG, 0)
+ ZEND_ARG_INFO(1, next)
+ZEND_END_ARG_INFO()
--- /dev/null
+<?php
+
+function idn_to_ascii(string $domain, int $options = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
+
+function idn_to_utf8(string $domain, int $options = 0, int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false {}
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_idn_to_ascii, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, domain, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, options, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, variant, IS_LONG, 0)
+ ZEND_ARG_INFO(1, idna_info)
+ZEND_END_ARG_INFO()
+
+#define arginfo_idn_to_utf8 arginfo_idn_to_ascii
--- /dev/null
+<?php
+
+class Normalizer
+{
+ /** @return string|false */
+ public static function normalize(string $input, int $form = Normalizer::FORM_C) {}
+
+ /** @return bool */
+ public static function isNormalized(string $input, int $form = Normalizer::FORM_C) {}
+
+#if U_ICU_VERSION_MAJOR_NUM >= 56
+ /** @return string|null */
+ public static function getRawDecomposition(string $input, int $form = Normalizer::FORM_C) {}
+#endif
+}
+
+function normalizer_normalize(string $input, int $form = Normalizer::FORM_C): string|false {}
+
+function normalizer_is_normalized(string $input, int $form = Normalizer::FORM_C): bool {}
+
+#if U_ICU_VERSION_MAJOR_NUM >= 56
+function normalizer_get_raw_decomposition(string $input, int $form = Normalizer::FORM_C): ?string {}
+#endif
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Normalizer_normalize, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_Normalizer_isNormalized arginfo_class_Normalizer_normalize
+
+#if U_ICU_VERSION_MAJOR_NUM >= 56
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Normalizer_getRawDecomposition, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+#endif
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_normalizer_normalize, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_normalizer_is_normalized, 0, 1, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#if U_ICU_VERSION_MAJOR_NUM >= 56
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_normalizer_get_raw_decomposition, 0, 1, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, input, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, form, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+#endif
#include "normalizer_class.h"
#include "php_intl.h"
#include "normalizer_normalize.h"
+#include "normalizer_arginfo.h"
#include "intl_error.h"
#include <unicode/unorm.h>
* 'Normalizer' class registration structures & functions
*/
-/* {{{ Normalizer methods arguments info */
-
-ZEND_BEGIN_ARG_INFO_EX( normalizer_args, 0, 0, 1 )
- ZEND_ARG_INFO( 0, input )
- ZEND_ARG_INFO( 0, form )
-ZEND_END_ARG_INFO()
-
-#if U_ICU_VERSION_MAJOR_NUM >= 56
-ZEND_BEGIN_ARG_INFO_EX( decomposition_args, 0, 0, 1 )
- ZEND_ARG_INFO( 0, input )
-ZEND_END_ARG_INFO();
-#endif
-
-/* }}} */
-
/* {{{ Normalizer_class_functions
* Every 'Normalizer' class method has an entry in this table
*/
static const zend_function_entry Normalizer_class_functions[] = {
- ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
+ ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), arginfo_class_Normalizer_normalize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
+ ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), arginfo_class_Normalizer_isNormalized, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
#if U_ICU_VERSION_MAJOR_NUM >= 56
- ZEND_FENTRY( getRawDecomposition, ZEND_FN( normalizer_get_raw_decomposition ), decomposition_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
+ ZEND_FENTRY( getRawDecomposition, ZEND_FN( normalizer_get_raw_decomposition ), arginfo_class_Normalizer_getRawDecomposition, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
#endif
PHP_FE_END
};
#include "formatter/formatter_parse.h"
#include "grapheme/grapheme.h"
+#include "grapheme/grapheme_arginfo.h"
#include "msgformat/msgformat.h"
#include "msgformat/msgformat_class.h"
#include "normalizer/normalizer.h"
#include "normalizer/normalizer_class.h"
#include "normalizer/normalizer_normalize.h"
+#include "normalizer/normalizer_arginfo.h"
#include "locale/locale.h"
#include "locale/locale_class.h"
#include "dateformat/dateformat_data.h"
#include "resourcebundle/resourcebundle_class.h"
+#include "resourcebundle/resourcebundle_arginfo.h"
#include "transliterator/transliterator.h"
#include "transliterator/transliterator_class.h"
#include "breakiterator/breakiterator_iterators.h"
#include "idn/idn.h"
+#include "idn/idn_arginfo.h"
#include "uchar/uchar.h"
# include "spoofchecker/spoofchecker_class.h"
#define intl_0_args collator_static_0_args
#define intl_1_arg collator_static_1_arg
-ZEND_BEGIN_ARG_INFO_EX(normalizer_args, 0, 0, 1)
- ZEND_ARG_INFO(0, input)
- ZEND_ARG_INFO(0, form)
-ZEND_END_ARG_INFO()
-
-#if U_ICU_VERSION_MAJOR_NUM >= 56
-ZEND_BEGIN_ARG_INFO_EX(decomposition_args, 0, 0, 1)
- ZEND_ARG_INFO(0, input)
-ZEND_END_ARG_INFO();
-#endif
-
-ZEND_BEGIN_ARG_INFO_EX(grapheme_1_arg, 0, 0, 1)
- ZEND_ARG_INFO(0, string)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(grapheme_search_args, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, offset)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(grapheme_substr_args, 0, 0, 2)
- ZEND_ARG_INFO(0, string)
- ZEND_ARG_INFO(0, start)
- ZEND_ARG_INFO(0, length)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(grapheme_strstr_args, 0, 0, 2)
- ZEND_ARG_INFO(0, haystack)
- ZEND_ARG_INFO(0, needle)
- ZEND_ARG_INFO(0, before_needle)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(grapheme_extract_args, 0, 0, 2)
- ZEND_ARG_INFO(0, arg1)
- ZEND_ARG_INFO(0, arg2)
- ZEND_ARG_INFO(0, arg3)
- ZEND_ARG_INFO(0, arg4)
- ZEND_ARG_INFO(1, arg5) /* 1 = pass by reference */
-ZEND_END_ARG_INFO()
-
ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 2)
ZEND_ARG_INFO(0, formatter)
ZEND_ARG_INFO(0, string)
ZEND_ARG_INFO(0, pattern)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(arginfo_idn_to_ascii, 0, 0, 1)
- ZEND_ARG_INFO(0, domain)
- ZEND_ARG_INFO(0, option)
- ZEND_ARG_INFO(0, variant)
- ZEND_ARG_INFO(1, idn_info)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_create_proc, 0, 0, 2 )
- ZEND_ARG_INFO( 0, locale )
- ZEND_ARG_INFO( 0, bundlename )
- ZEND_ARG_INFO( 0, fallback )
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get_proc, 0, 0, 2 )
- ZEND_ARG_INFO( 0, bundle )
- ZEND_ARG_INFO( 0, index )
- ZEND_ARG_INFO( 0, fallback )
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_count_proc, 0, 0, 1 )
- ZEND_ARG_INFO( 0, bundle )
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_locales_proc, 0, 0, 1 )
- ZEND_ARG_INFO( 0, bundlename )
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get_error_code_proc, 0, 0, 1 )
- ZEND_ARG_INFO( 0, bundle )
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get_error_message_proc, 0, 0, 1 )
- ZEND_ARG_INFO( 0, bundle )
-ZEND_END_ARG_INFO()
-
ZEND_BEGIN_ARG_INFO_EX( arginfo_transliterator_void, 0, 0, 0 )
ZEND_END_ARG_INFO()
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 )
+ PHP_FE( normalizer_normalize, arginfo_normalizer_normalize )
+ PHP_FE( normalizer_is_normalized, arginfo_normalizer_is_normalized )
#if U_ICU_VERSION_MAJOR_NUM >= 56
- PHP_FE( normalizer_get_raw_decomposition, decomposition_args )
+ PHP_FE( normalizer_get_raw_decomposition, arginfo_normalizer_get_raw_decomposition )
#endif
/* Locale functions */
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 )
+ PHP_FE( grapheme_strlen, arginfo_grapheme_strlen )
+ PHP_FE( grapheme_strpos, arginfo_grapheme_strpos )
+ PHP_FE( grapheme_stripos, arginfo_grapheme_stripos )
+ PHP_FE( grapheme_strrpos, arginfo_grapheme_strrpos )
+ PHP_FE( grapheme_strripos, arginfo_grapheme_strripos )
+ PHP_FE( grapheme_substr, arginfo_grapheme_substr )
+ PHP_FE( grapheme_strstr, arginfo_grapheme_strstr )
+ PHP_FE( grapheme_stristr, arginfo_grapheme_stristr )
+ PHP_FE( grapheme_extract, arginfo_grapheme_extract )
/* IDN functions */
PHP_FE( idn_to_ascii, arginfo_idn_to_ascii)
- PHP_FE( idn_to_utf8, arginfo_idn_to_ascii)
+ PHP_FE( idn_to_utf8, arginfo_idn_to_utf8)
/* 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 )
+ PHP_FE( resourcebundle_create, arginfo_resourcebundle_create )
+ PHP_FE( resourcebundle_get, arginfo_resourcebundle_get )
+ PHP_FE( resourcebundle_count, arginfo_resourcebundle_count )
+ PHP_FE( resourcebundle_locales, arginfo_resourcebundle_locales )
+ PHP_FE( resourcebundle_get_error_code, arginfo_resourcebundle_get_error_code )
+ PHP_FE( resourcebundle_get_error_message, arginfo_resourcebundle_get_error_message )
/* Transliterator functions */
PHP_FE( transliterator_create, arginfo_transliterator_create )
--- /dev/null
+<?php
+
+class ResourceBundle implements Traversable
+{
+ public function __construct(?string $locale, ?string $bundlename, bool $fallback = true) {}
+
+ /** @return ResourceBundle|null */
+ public static function create(?string $locale, ?string $bundlename, bool $fallback = true) {}
+
+ /**
+ * @param string|int $index
+ * @return mixed
+ */
+ public function get($index, bool $fallback = true) {}
+
+ /** @return int|false */
+ public function count() {}
+
+ /** @return array|false */
+ public static function getLocales(string $bundlename) {}
+
+ /** @return int */
+ public function getErrorCode() {}
+
+ /** @return string */
+ public function getErrorMessage() {}
+}
+
+function resourcebundle_create(?string $locale, ?string $bundlename, bool $fallback = true): ?ResourceBundle {}
+
+/**
+ * @param string|int $index
+ * @return mixed
+ */
+function resourcebundle_get(ResourceBundle $bundle, $index) {}
+
+function resourcebundle_count(ResourceBundle $bundle): int|false {}
+
+function resourcebundle_locales(string $bundlename): array|false {}
+
+function resourcebundle_get_error_code(ResourceBundle $bundle): int {}
+
+function resourcebundle_get_error_message(ResourceBundle $bundle): string {}
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle___construct, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_ResourceBundle_create arginfo_class_ResourceBundle___construct
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle_get, 0, 0, 1)
+ ZEND_ARG_INFO(0, index)
+ ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle_count, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ResourceBundle_getLocales, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_ResourceBundle_getErrorCode arginfo_class_ResourceBundle_count
+
+#define arginfo_class_ResourceBundle_getErrorMessage arginfo_class_ResourceBundle_count
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_resourcebundle_create, 0, 2, ResourceBundle, 1)
+ ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, fallback, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_resourcebundle_get, 0, 0, 2)
+ ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0)
+ ZEND_ARG_INFO(0, index)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_resourcebundle_count, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
+ ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_resourcebundle_locales, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
+ ZEND_ARG_TYPE_INFO(0, bundlename, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourcebundle_get_error_code, 0, 1, IS_LONG, 0)
+ ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_resourcebundle_get_error_message, 0, 1, IS_STRING, 0)
+ ZEND_ARG_OBJ_INFO(0, bundle, ResourceBundle, 0)
+ZEND_END_ARG_INFO()
#include "resourcebundle/resourcebundle.h"
#include "resourcebundle/resourcebundle_iterator.h"
#include "resourcebundle/resourcebundle_class.h"
+#include "resourcebundle/resourcebundle_arginfo.h"
zend_class_entry *ResourceBundle_ce_ptr = NULL;
}
/* }}} */
-/* {{{ arginfo_resourcebundle__construct */
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle___construct, 0, 0, 2 )
- ZEND_ARG_INFO( 0, locale )
- ZEND_ARG_INFO( 0, bundlename )
- ZEND_ARG_INFO( 0, fallback )
-ZEND_END_ARG_INFO()
-/* }}} */
-
/* {{{ proto ResourceBundle::__construct( string $locale [, string $bundlename [, bool $fallback = true ]] )
* ResourceBundle object constructor
*/
}
/* }}} */
-/* {{{ arginfo_resourcebundle_get */
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get, 0, 0, 1 )
- ZEND_ARG_INFO( 0, index )
- ZEND_ARG_INFO( 0, fallback )
-ZEND_END_ARG_INFO()
-/* }}} */
-
/* {{{ proto mixed ResourceBundle::get( int|string $resindex [, bool $fallback = true ] )
* proto mixed resourcebundle_get( ResourceBundle $rb, int|string $resindex [, bool $fallback = true ] )
* Get resource identified by numerical index or key name.
}
/* }}} */
-/* {{{ arginfo_resourcebundle_count */
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_count, 0, 0, 0 )
-ZEND_END_ARG_INFO()
-/* }}} */
-
/* {{{ proto int ResourceBundle::count()
* proto int resourcebundle_count( ResourceBundle $bundle )
* Get resources count
RETURN_LONG( len );
}
-/* {{{ arginfo_resourcebundle_getlocales */
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_getlocales, 0, 0, 1 )
- ZEND_ARG_INFO( 0, bundlename )
-ZEND_END_ARG_INFO()
-/* }}} */
-
/* {{{ proto array ResourceBundle::getLocales( string $bundlename )
* proto array resourcebundle_locales( string $bundlename )
* Get available locales from ResourceBundle name
}
/* }}} */
-/* {{{ arginfo_resourcebundle_get_error_code */
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get_error_code, 0, 0, 0 )
-ZEND_END_ARG_INFO()
-/* }}} */
-
/* {{{ proto string ResourceBundle::getErrorCode( )
* proto string resourcebundle_get_error_code( ResourceBundle $bundle )
* Get text description for ResourceBundle's last error code.
}
/* }}} */
-/* {{{ arginfo_resourcebundle_get_error_message */
-ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle_get_error_message, 0, 0, 0 )
-ZEND_END_ARG_INFO()
-/* }}} */
-
/* {{{ proto string ResourceBundle::getErrorMessage( )
* proto string resourcebundle_get_error_message( ResourceBundle $bundle )
* Get text description for ResourceBundle's last error.
* Every 'ResourceBundle' class method has an entry in this table
*/
static const zend_function_entry ResourceBundle_class_functions[] = {
- PHP_ME( ResourceBundle, __construct, arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC )
- ZEND_NAMED_ME( create, ZEND_FN( resourcebundle_create ), arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
- ZEND_NAMED_ME( get, ZEND_FN(resourcebundle_get), arginfo_resourcebundle_get, ZEND_ACC_PUBLIC )
- ZEND_NAMED_ME( count, ZEND_FN(resourcebundle_count), arginfo_resourcebundle_count, ZEND_ACC_PUBLIC )
- ZEND_NAMED_ME( getLocales, ZEND_FN(resourcebundle_locales), arginfo_resourcebundle_getlocales, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC )
- ZEND_NAMED_ME( getErrorCode, ZEND_FN(resourcebundle_get_error_code), arginfo_resourcebundle_get_error_code, ZEND_ACC_PUBLIC )
- ZEND_NAMED_ME( getErrorMessage, ZEND_FN(resourcebundle_get_error_message), arginfo_resourcebundle_get_error_message, ZEND_ACC_PUBLIC )
+ PHP_ME( ResourceBundle, __construct, arginfo_class_ResourceBundle___construct, ZEND_ACC_PUBLIC )
+ ZEND_NAMED_ME( create, ZEND_FN( resourcebundle_create ), arginfo_class_ResourceBundle_create, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
+ ZEND_NAMED_ME( get, ZEND_FN(resourcebundle_get), arginfo_class_ResourceBundle_get, ZEND_ACC_PUBLIC )
+ ZEND_NAMED_ME( count, ZEND_FN(resourcebundle_count), arginfo_class_ResourceBundle_count, ZEND_ACC_PUBLIC )
+ ZEND_NAMED_ME( getLocales, ZEND_FN(resourcebundle_locales), arginfo_class_ResourceBundle_getLocales, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC )
+ ZEND_NAMED_ME( getErrorCode, ZEND_FN(resourcebundle_get_error_code), arginfo_class_ResourceBundle_getErrorCode, ZEND_ACC_PUBLIC )
+ ZEND_NAMED_ME( getErrorMessage, ZEND_FN(resourcebundle_get_error_message), arginfo_class_ResourceBundle_getErrorMessage, ZEND_ACC_PUBLIC )
PHP_FE_END
};
/* }}} */
--- /dev/null
+<?php
+
+class Spoofchecker
+{
+ public function __construct() {}
+
+ /** @return bool */
+ public function isSuspicious(string $text, &$error = null) {}
+
+ /** @return bool */
+ public function areConfusable(string $s1, string $s2, &$error = null) {}
+
+ /** @return null|false */
+ public function setAllowedLocales(string $locale_list) {}
+
+ /** @return null|false */
+ public function setChecks(int $checks) {}
+
+#if U_ICU_VERSION_MAJOR_NUM >= 58
+ /** @return null|false */
+ public function setRestrictionLevel(int $level) {}
+#endif
+}
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker___construct, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_isSuspicious, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, text, IS_STRING, 0)
+ ZEND_ARG_INFO(1, error)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_areConfusable, 0, 0, 2)
+ ZEND_ARG_TYPE_INFO(0, s1, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, s2, IS_STRING, 0)
+ ZEND_ARG_INFO(1, error)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_setAllowedLocales, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, locale_list, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_setChecks, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, checks, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+#if U_ICU_VERSION_MAJOR_NUM >= 58
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Spoofchecker_setRestrictionLevel, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+#endif
#include "spoofchecker_class.h"
#include "spoofchecker_main.h"
#include "spoofchecker_create.h"
+#include "spoofchecker_arginfo.h"
#include "php_intl.h"
#include "intl_error.h"
* 'Spoofchecker' class registration structures & functions
*/
-/* {{{ Spoofchecker methods arguments info */
-ZEND_BEGIN_ARG_INFO_EX(spoofchecker_0_args, 0, 0, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(spoofchecker_set_checks, 0, 0, 1)
- ZEND_ARG_INFO(0, checks)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(spoofchecker_set_allowed_locales, 0, 0, 1)
- ZEND_ARG_INFO(0, locale_list)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(spoofchecker_is_suspicous, 0, 0, 1)
- ZEND_ARG_INFO(0, text)
- ZEND_ARG_INFO(1, error)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(spoofchecker_are_confusable, 0, 0, 2)
- ZEND_ARG_INFO(0, s1)
- ZEND_ARG_INFO(0, s2)
- ZEND_ARG_INFO(1, error)
-ZEND_END_ARG_INFO()
-
-#if U_ICU_VERSION_MAJOR_NUM >= 58
-ZEND_BEGIN_ARG_INFO_EX(spoofchecker_set_restriction_level, 0, 0, 1)
- ZEND_ARG_INFO(0, level)
-ZEND_END_ARG_INFO()
-#endif
-
-/* }}} */
-
/* {{{ Spoofchecker_class_functions
* Every 'Spoofchecker' class method has an entry in this table
*/
static const zend_function_entry Spoofchecker_class_functions[] = {
- PHP_ME(Spoofchecker, __construct, spoofchecker_0_args, ZEND_ACC_PUBLIC)
- PHP_ME(Spoofchecker, isSuspicious, spoofchecker_is_suspicous, ZEND_ACC_PUBLIC)
- PHP_ME(Spoofchecker, areConfusable, spoofchecker_are_confusable, ZEND_ACC_PUBLIC)
- PHP_ME(Spoofchecker, setAllowedLocales, spoofchecker_set_allowed_locales, ZEND_ACC_PUBLIC)
- PHP_ME(Spoofchecker, setChecks, spoofchecker_set_checks, ZEND_ACC_PUBLIC)
+ PHP_ME(Spoofchecker, __construct, arginfo_class_Spoofchecker___construct, ZEND_ACC_PUBLIC)
+ PHP_ME(Spoofchecker, isSuspicious, arginfo_class_Spoofchecker_isSuspicious, ZEND_ACC_PUBLIC)
+ PHP_ME(Spoofchecker, areConfusable, arginfo_class_Spoofchecker_areConfusable, ZEND_ACC_PUBLIC)
+ PHP_ME(Spoofchecker, setAllowedLocales, arginfo_class_Spoofchecker_setAllowedLocales, ZEND_ACC_PUBLIC)
+ PHP_ME(Spoofchecker, setChecks, arginfo_class_Spoofchecker_setChecks, ZEND_ACC_PUBLIC)
#if U_ICU_VERSION_MAJOR_NUM >= 58
- PHP_ME(Spoofchecker, setRestrictionLevel, spoofchecker_set_restriction_level, ZEND_ACC_PUBLIC)
+ PHP_ME(Spoofchecker, setRestrictionLevel, arginfo_class_Spoofchecker_setRestrictionLevel, ZEND_ACC_PUBLIC)
#endif
PHP_FE_END
};