xref: /PHP-8.2/ext/intl/locale/locale_arginfo.h (revision e4f23769)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: ada449c81e2e3657dbbff7b77ce2410f9f5b1a9a */
3 
4 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Locale_getDefault, 0, 0, IS_STRING, 0)
5 ZEND_END_ARG_INFO()
6 
7 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Locale_setDefault, 0, 0, 1)
8 	ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
9 ZEND_END_ARG_INFO()
10 
11 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Locale_getPrimaryLanguage, 0, 1, IS_STRING, 1)
12 	ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
13 ZEND_END_ARG_INFO()
14 
15 #define arginfo_class_Locale_getScript arginfo_class_Locale_getPrimaryLanguage
16 
17 #define arginfo_class_Locale_getRegion arginfo_class_Locale_getPrimaryLanguage
18 
19 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_Locale_getKeywords, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE|MAY_BE_NULL)
20 	ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
21 ZEND_END_ARG_INFO()
22 
23 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_Locale_getDisplayScript, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
24 	ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
25 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, displayLocale, IS_STRING, 1, "null")
26 ZEND_END_ARG_INFO()
27 
28 #define arginfo_class_Locale_getDisplayRegion arginfo_class_Locale_getDisplayScript
29 
30 #define arginfo_class_Locale_getDisplayName arginfo_class_Locale_getDisplayScript
31 
32 #define arginfo_class_Locale_getDisplayLanguage arginfo_class_Locale_getDisplayScript
33 
34 #define arginfo_class_Locale_getDisplayVariant arginfo_class_Locale_getDisplayScript
35 
36 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_Locale_composeLocale, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
37 	ZEND_ARG_TYPE_INFO(0, subtags, IS_ARRAY, 0)
38 ZEND_END_ARG_INFO()
39 
40 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Locale_parseLocale, 0, 1, IS_ARRAY, 1)
41 	ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
42 ZEND_END_ARG_INFO()
43 
44 #define arginfo_class_Locale_getAllVariants arginfo_class_Locale_parseLocale
45 
46 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Locale_filterMatches, 0, 2, _IS_BOOL, 1)
47 	ZEND_ARG_TYPE_INFO(0, languageTag, IS_STRING, 0)
48 	ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
49 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, canonicalize, _IS_BOOL, 0, "false")
50 ZEND_END_ARG_INFO()
51 
52 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Locale_lookup, 0, 2, IS_STRING, 1)
53 	ZEND_ARG_TYPE_INFO(0, languageTag, IS_ARRAY, 0)
54 	ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
55 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, canonicalize, _IS_BOOL, 0, "false")
56 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, defaultLocale, IS_STRING, 1, "null")
57 ZEND_END_ARG_INFO()
58 
59 #define arginfo_class_Locale_canonicalize arginfo_class_Locale_getPrimaryLanguage
60 
61 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_Locale_acceptFromHttp, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
62 	ZEND_ARG_TYPE_INFO(0, header, IS_STRING, 0)
63 ZEND_END_ARG_INFO()
64 
65 
66 ZEND_FUNCTION(locale_get_default);
67 ZEND_FUNCTION(locale_set_default);
68 ZEND_FUNCTION(locale_get_primary_language);
69 ZEND_FUNCTION(locale_get_script);
70 ZEND_FUNCTION(locale_get_region);
71 ZEND_FUNCTION(locale_get_keywords);
72 ZEND_FUNCTION(locale_get_display_script);
73 ZEND_FUNCTION(locale_get_display_region);
74 ZEND_FUNCTION(locale_get_display_name);
75 ZEND_FUNCTION(locale_get_display_language);
76 ZEND_FUNCTION(locale_get_display_variant);
77 ZEND_FUNCTION(locale_compose);
78 ZEND_FUNCTION(locale_parse);
79 ZEND_FUNCTION(locale_get_all_variants);
80 ZEND_FUNCTION(locale_filter_matches);
81 ZEND_FUNCTION(locale_lookup);
82 ZEND_FUNCTION(locale_canonicalize);
83 ZEND_FUNCTION(locale_accept_from_http);
84 
85 
86 static const zend_function_entry class_Locale_methods[] = {
87 	ZEND_ME_MAPPING(getDefault, locale_get_default, arginfo_class_Locale_getDefault, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
88 	ZEND_ME_MAPPING(setDefault, locale_set_default, arginfo_class_Locale_setDefault, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
89 	ZEND_ME_MAPPING(getPrimaryLanguage, locale_get_primary_language, arginfo_class_Locale_getPrimaryLanguage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
90 	ZEND_ME_MAPPING(getScript, locale_get_script, arginfo_class_Locale_getScript, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
91 	ZEND_ME_MAPPING(getRegion, locale_get_region, arginfo_class_Locale_getRegion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
92 	ZEND_ME_MAPPING(getKeywords, locale_get_keywords, arginfo_class_Locale_getKeywords, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
93 	ZEND_ME_MAPPING(getDisplayScript, locale_get_display_script, arginfo_class_Locale_getDisplayScript, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
94 	ZEND_ME_MAPPING(getDisplayRegion, locale_get_display_region, arginfo_class_Locale_getDisplayRegion, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
95 	ZEND_ME_MAPPING(getDisplayName, locale_get_display_name, arginfo_class_Locale_getDisplayName, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
96 	ZEND_ME_MAPPING(getDisplayLanguage, locale_get_display_language, arginfo_class_Locale_getDisplayLanguage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
97 	ZEND_ME_MAPPING(getDisplayVariant, locale_get_display_variant, arginfo_class_Locale_getDisplayVariant, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
98 	ZEND_ME_MAPPING(composeLocale, locale_compose, arginfo_class_Locale_composeLocale, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
99 	ZEND_ME_MAPPING(parseLocale, locale_parse, arginfo_class_Locale_parseLocale, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
100 	ZEND_ME_MAPPING(getAllVariants, locale_get_all_variants, arginfo_class_Locale_getAllVariants, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
101 	ZEND_ME_MAPPING(filterMatches, locale_filter_matches, arginfo_class_Locale_filterMatches, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
102 	ZEND_ME_MAPPING(lookup, locale_lookup, arginfo_class_Locale_lookup, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
103 	ZEND_ME_MAPPING(canonicalize, locale_canonicalize, arginfo_class_Locale_canonicalize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
104 	ZEND_ME_MAPPING(acceptFromHttp, locale_accept_from_http, arginfo_class_Locale_acceptFromHttp, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
105 	ZEND_FE_END
106 };
107 
register_class_Locale(void)108 static zend_class_entry *register_class_Locale(void)
109 {
110 	zend_class_entry ce, *class_entry;
111 
112 	INIT_CLASS_ENTRY(ce, "Locale", class_Locale_methods);
113 	class_entry = zend_register_internal_class_ex(&ce, NULL);
114 
115 	zval const_ACTUAL_LOCALE_value;
116 	ZVAL_LONG(&const_ACTUAL_LOCALE_value, ULOC_ACTUAL_LOCALE);
117 	zend_string *const_ACTUAL_LOCALE_name = zend_string_init_interned("ACTUAL_LOCALE", sizeof("ACTUAL_LOCALE") - 1, 1);
118 	zend_declare_class_constant_ex(class_entry, const_ACTUAL_LOCALE_name, &const_ACTUAL_LOCALE_value, ZEND_ACC_PUBLIC, NULL);
119 	zend_string_release(const_ACTUAL_LOCALE_name);
120 
121 	zval const_VALID_LOCALE_value;
122 	ZVAL_LONG(&const_VALID_LOCALE_value, ULOC_VALID_LOCALE);
123 	zend_string *const_VALID_LOCALE_name = zend_string_init_interned("VALID_LOCALE", sizeof("VALID_LOCALE") - 1, 1);
124 	zend_declare_class_constant_ex(class_entry, const_VALID_LOCALE_name, &const_VALID_LOCALE_value, ZEND_ACC_PUBLIC, NULL);
125 	zend_string_release(const_VALID_LOCALE_name);
126 
127 	zval const_DEFAULT_LOCALE_value;
128 	ZVAL_NULL(&const_DEFAULT_LOCALE_value);
129 	zend_string *const_DEFAULT_LOCALE_name = zend_string_init_interned("DEFAULT_LOCALE", sizeof("DEFAULT_LOCALE") - 1, 1);
130 	zend_declare_class_constant_ex(class_entry, const_DEFAULT_LOCALE_name, &const_DEFAULT_LOCALE_value, ZEND_ACC_PUBLIC, NULL);
131 	zend_string_release(const_DEFAULT_LOCALE_name);
132 
133 	zval const_LANG_TAG_value;
134 	zend_string *const_LANG_TAG_value_str = zend_string_init(LOC_LANG_TAG, strlen(LOC_LANG_TAG), 1);
135 	ZVAL_STR(&const_LANG_TAG_value, const_LANG_TAG_value_str);
136 	zend_string *const_LANG_TAG_name = zend_string_init_interned("LANG_TAG", sizeof("LANG_TAG") - 1, 1);
137 	zend_declare_class_constant_ex(class_entry, const_LANG_TAG_name, &const_LANG_TAG_value, ZEND_ACC_PUBLIC, NULL);
138 	zend_string_release(const_LANG_TAG_name);
139 
140 	zval const_EXTLANG_TAG_value;
141 	zend_string *const_EXTLANG_TAG_value_str = zend_string_init(LOC_EXTLANG_TAG, strlen(LOC_EXTLANG_TAG), 1);
142 	ZVAL_STR(&const_EXTLANG_TAG_value, const_EXTLANG_TAG_value_str);
143 	zend_string *const_EXTLANG_TAG_name = zend_string_init_interned("EXTLANG_TAG", sizeof("EXTLANG_TAG") - 1, 1);
144 	zend_declare_class_constant_ex(class_entry, const_EXTLANG_TAG_name, &const_EXTLANG_TAG_value, ZEND_ACC_PUBLIC, NULL);
145 	zend_string_release(const_EXTLANG_TAG_name);
146 
147 	zval const_SCRIPT_TAG_value;
148 	zend_string *const_SCRIPT_TAG_value_str = zend_string_init(LOC_SCRIPT_TAG, strlen(LOC_SCRIPT_TAG), 1);
149 	ZVAL_STR(&const_SCRIPT_TAG_value, const_SCRIPT_TAG_value_str);
150 	zend_string *const_SCRIPT_TAG_name = zend_string_init_interned("SCRIPT_TAG", sizeof("SCRIPT_TAG") - 1, 1);
151 	zend_declare_class_constant_ex(class_entry, const_SCRIPT_TAG_name, &const_SCRIPT_TAG_value, ZEND_ACC_PUBLIC, NULL);
152 	zend_string_release(const_SCRIPT_TAG_name);
153 
154 	zval const_REGION_TAG_value;
155 	zend_string *const_REGION_TAG_value_str = zend_string_init(LOC_REGION_TAG, strlen(LOC_REGION_TAG), 1);
156 	ZVAL_STR(&const_REGION_TAG_value, const_REGION_TAG_value_str);
157 	zend_string *const_REGION_TAG_name = zend_string_init_interned("REGION_TAG", sizeof("REGION_TAG") - 1, 1);
158 	zend_declare_class_constant_ex(class_entry, const_REGION_TAG_name, &const_REGION_TAG_value, ZEND_ACC_PUBLIC, NULL);
159 	zend_string_release(const_REGION_TAG_name);
160 
161 	zval const_VARIANT_TAG_value;
162 	zend_string *const_VARIANT_TAG_value_str = zend_string_init(LOC_VARIANT_TAG, strlen(LOC_VARIANT_TAG), 1);
163 	ZVAL_STR(&const_VARIANT_TAG_value, const_VARIANT_TAG_value_str);
164 	zend_string *const_VARIANT_TAG_name = zend_string_init_interned("VARIANT_TAG", sizeof("VARIANT_TAG") - 1, 1);
165 	zend_declare_class_constant_ex(class_entry, const_VARIANT_TAG_name, &const_VARIANT_TAG_value, ZEND_ACC_PUBLIC, NULL);
166 	zend_string_release(const_VARIANT_TAG_name);
167 
168 	zval const_GRANDFATHERED_LANG_TAG_value;
169 	zend_string *const_GRANDFATHERED_LANG_TAG_value_str = zend_string_init(LOC_GRANDFATHERED_LANG_TAG, strlen(LOC_GRANDFATHERED_LANG_TAG), 1);
170 	ZVAL_STR(&const_GRANDFATHERED_LANG_TAG_value, const_GRANDFATHERED_LANG_TAG_value_str);
171 	zend_string *const_GRANDFATHERED_LANG_TAG_name = zend_string_init_interned("GRANDFATHERED_LANG_TAG", sizeof("GRANDFATHERED_LANG_TAG") - 1, 1);
172 	zend_declare_class_constant_ex(class_entry, const_GRANDFATHERED_LANG_TAG_name, &const_GRANDFATHERED_LANG_TAG_value, ZEND_ACC_PUBLIC, NULL);
173 	zend_string_release(const_GRANDFATHERED_LANG_TAG_name);
174 
175 	zval const_PRIVATE_TAG_value;
176 	zend_string *const_PRIVATE_TAG_value_str = zend_string_init(LOC_PRIVATE_TAG, strlen(LOC_PRIVATE_TAG), 1);
177 	ZVAL_STR(&const_PRIVATE_TAG_value, const_PRIVATE_TAG_value_str);
178 	zend_string *const_PRIVATE_TAG_name = zend_string_init_interned("PRIVATE_TAG", sizeof("PRIVATE_TAG") - 1, 1);
179 	zend_declare_class_constant_ex(class_entry, const_PRIVATE_TAG_name, &const_PRIVATE_TAG_value, ZEND_ACC_PUBLIC, NULL);
180 	zend_string_release(const_PRIVATE_TAG_name);
181 
182 	return class_entry;
183 }
184