xref: /PHP-8.2/ext/pspell/pspell_arginfo.h (revision b4ec3e9b)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 8d35f61a0b48c5422b31e78f587d9258fd3e8e37 */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pspell_new, 0, 1, PSpell\\Dictionary, MAY_BE_FALSE)
5 	ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
6 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, spelling, IS_STRING, 0, "\"\"")
7 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, jargon, IS_STRING, 0, "\"\"")
8 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 0, "\"\"")
9 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0")
10 ZEND_END_ARG_INFO()
11 
12 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pspell_new_personal, 0, 2, PSpell\\Dictionary, MAY_BE_FALSE)
13 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
14 	ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
15 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, spelling, IS_STRING, 0, "\"\"")
16 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, jargon, IS_STRING, 0, "\"\"")
17 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 0, "\"\"")
18 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0")
19 ZEND_END_ARG_INFO()
20 
21 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pspell_new_config, 0, 1, PSpell\\Dictionary, MAY_BE_FALSE)
22 	ZEND_ARG_OBJ_INFO(0, config, PSpell\\Config, 0)
23 ZEND_END_ARG_INFO()
24 
25 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_check, 0, 2, _IS_BOOL, 0)
26 	ZEND_ARG_OBJ_INFO(0, dictionary, PSpell\\Dictionary, 0)
27 	ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
28 ZEND_END_ARG_INFO()
29 
30 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pspell_suggest, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
31 	ZEND_ARG_OBJ_INFO(0, dictionary, PSpell\\Dictionary, 0)
32 	ZEND_ARG_TYPE_INFO(0, word, IS_STRING, 0)
33 ZEND_END_ARG_INFO()
34 
35 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_store_replacement, 0, 3, _IS_BOOL, 0)
36 	ZEND_ARG_OBJ_INFO(0, dictionary, PSpell\\Dictionary, 0)
37 	ZEND_ARG_TYPE_INFO(0, misspelled, IS_STRING, 0)
38 	ZEND_ARG_TYPE_INFO(0, correct, IS_STRING, 0)
39 ZEND_END_ARG_INFO()
40 
41 #define arginfo_pspell_add_to_personal arginfo_pspell_check
42 
43 #define arginfo_pspell_add_to_session arginfo_pspell_check
44 
45 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_clear_session, 0, 1, _IS_BOOL, 0)
46 	ZEND_ARG_OBJ_INFO(0, dictionary, PSpell\\Dictionary, 0)
47 ZEND_END_ARG_INFO()
48 
49 #define arginfo_pspell_save_wordlist arginfo_pspell_clear_session
50 
51 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_pspell_config_create, 0, 1, PSpell\\Config, 0)
52 	ZEND_ARG_TYPE_INFO(0, language, IS_STRING, 0)
53 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, spelling, IS_STRING, 0, "\"\"")
54 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, jargon, IS_STRING, 0, "\"\"")
55 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 0, "\"\"")
56 ZEND_END_ARG_INFO()
57 
58 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_runtogether, 0, 2, _IS_BOOL, 0)
59 	ZEND_ARG_OBJ_INFO(0, config, PSpell\\Config, 0)
60 	ZEND_ARG_TYPE_INFO(0, allow, _IS_BOOL, 0)
61 ZEND_END_ARG_INFO()
62 
63 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_mode, 0, 2, _IS_BOOL, 0)
64 	ZEND_ARG_OBJ_INFO(0, config, PSpell\\Config, 0)
65 	ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
66 ZEND_END_ARG_INFO()
67 
68 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_ignore, 0, 2, _IS_BOOL, 0)
69 	ZEND_ARG_OBJ_INFO(0, config, PSpell\\Config, 0)
70 	ZEND_ARG_TYPE_INFO(0, min_length, IS_LONG, 0)
71 ZEND_END_ARG_INFO()
72 
73 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_personal, 0, 2, _IS_BOOL, 0)
74 	ZEND_ARG_OBJ_INFO(0, config, PSpell\\Config, 0)
75 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
76 ZEND_END_ARG_INFO()
77 
78 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_dict_dir, 0, 2, _IS_BOOL, 0)
79 	ZEND_ARG_OBJ_INFO(0, config, PSpell\\Config, 0)
80 	ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
81 ZEND_END_ARG_INFO()
82 
83 #define arginfo_pspell_config_data_dir arginfo_pspell_config_dict_dir
84 
85 #define arginfo_pspell_config_repl arginfo_pspell_config_personal
86 
87 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pspell_config_save_repl, 0, 2, _IS_BOOL, 0)
88 	ZEND_ARG_OBJ_INFO(0, config, PSpell\\Config, 0)
89 	ZEND_ARG_TYPE_INFO(0, save, _IS_BOOL, 0)
90 ZEND_END_ARG_INFO()
91 
92 
93 ZEND_FUNCTION(pspell_new);
94 ZEND_FUNCTION(pspell_new_personal);
95 ZEND_FUNCTION(pspell_new_config);
96 ZEND_FUNCTION(pspell_check);
97 ZEND_FUNCTION(pspell_suggest);
98 ZEND_FUNCTION(pspell_store_replacement);
99 ZEND_FUNCTION(pspell_add_to_personal);
100 ZEND_FUNCTION(pspell_add_to_session);
101 ZEND_FUNCTION(pspell_clear_session);
102 ZEND_FUNCTION(pspell_save_wordlist);
103 ZEND_FUNCTION(pspell_config_create);
104 ZEND_FUNCTION(pspell_config_runtogether);
105 ZEND_FUNCTION(pspell_config_mode);
106 ZEND_FUNCTION(pspell_config_ignore);
107 ZEND_FUNCTION(pspell_config_personal);
108 ZEND_FUNCTION(pspell_config_dict_dir);
109 ZEND_FUNCTION(pspell_config_data_dir);
110 ZEND_FUNCTION(pspell_config_repl);
111 ZEND_FUNCTION(pspell_config_save_repl);
112 
113 
114 static const zend_function_entry ext_functions[] = {
115 	ZEND_FE(pspell_new, arginfo_pspell_new)
116 	ZEND_FE(pspell_new_personal, arginfo_pspell_new_personal)
117 	ZEND_FE(pspell_new_config, arginfo_pspell_new_config)
118 	ZEND_FE(pspell_check, arginfo_pspell_check)
119 	ZEND_FE(pspell_suggest, arginfo_pspell_suggest)
120 	ZEND_FE(pspell_store_replacement, arginfo_pspell_store_replacement)
121 	ZEND_FE(pspell_add_to_personal, arginfo_pspell_add_to_personal)
122 	ZEND_FE(pspell_add_to_session, arginfo_pspell_add_to_session)
123 	ZEND_FE(pspell_clear_session, arginfo_pspell_clear_session)
124 	ZEND_FE(pspell_save_wordlist, arginfo_pspell_save_wordlist)
125 	ZEND_FE(pspell_config_create, arginfo_pspell_config_create)
126 	ZEND_FE(pspell_config_runtogether, arginfo_pspell_config_runtogether)
127 	ZEND_FE(pspell_config_mode, arginfo_pspell_config_mode)
128 	ZEND_FE(pspell_config_ignore, arginfo_pspell_config_ignore)
129 	ZEND_FE(pspell_config_personal, arginfo_pspell_config_personal)
130 	ZEND_FE(pspell_config_dict_dir, arginfo_pspell_config_dict_dir)
131 	ZEND_FE(pspell_config_data_dir, arginfo_pspell_config_data_dir)
132 	ZEND_FE(pspell_config_repl, arginfo_pspell_config_repl)
133 	ZEND_FE(pspell_config_save_repl, arginfo_pspell_config_save_repl)
134 	ZEND_FE_END
135 };
136 
137 
138 static const zend_function_entry class_PSpell_Dictionary_methods[] = {
139 	ZEND_FE_END
140 };
141 
142 
143 static const zend_function_entry class_PSpell_Config_methods[] = {
144 	ZEND_FE_END
145 };
146 
register_pspell_symbols(int module_number)147 static void register_pspell_symbols(int module_number)
148 {
149 	REGISTER_LONG_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_PERSISTENT);
150 	REGISTER_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT);
151 	REGISTER_LONG_CONSTANT("PSPELL_BAD_SPELLERS", PSPELL_BAD_SPELLERS, CONST_PERSISTENT);
152 	REGISTER_LONG_CONSTANT("PSPELL_RUN_TOGETHER", PSPELL_RUN_TOGETHER, CONST_PERSISTENT);
153 }
154 
register_class_PSpell_Dictionary(void)155 static zend_class_entry *register_class_PSpell_Dictionary(void)
156 {
157 	zend_class_entry ce, *class_entry;
158 
159 	INIT_NS_CLASS_ENTRY(ce, "PSpell", "Dictionary", class_PSpell_Dictionary_methods);
160 	class_entry = zend_register_internal_class_ex(&ce, NULL);
161 	class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
162 
163 	return class_entry;
164 }
165 
register_class_PSpell_Config(void)166 static zend_class_entry *register_class_PSpell_Config(void)
167 {
168 	zend_class_entry ce, *class_entry;
169 
170 	INIT_NS_CLASS_ENTRY(ce, "PSpell", "Config", class_PSpell_Config_methods);
171 	class_entry = zend_register_internal_class_ex(&ce, NULL);
172 	class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
173 
174 	return class_entry;
175 }
176