forked from HvyIndustries/crane-php-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enchant.php
309 lines (283 loc) · 9.81 KB
/
enchant.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<?php
// Start of enchant v.1.1.0
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* create a new broker object capable of requesting
* @link http://php.net/manual/en/function.enchant-broker-init.php
* @return resource a broker resource on success or <b>FALSE</b>.
*/
function enchant_broker_init() {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Free the broker resource and its dictionnaries
* @link http://php.net/manual/en/function.enchant-broker-free.php
* @param resource $broker <p>
* Broker resource
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_broker_free($broker): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Returns the last error of the broker
* @link http://php.net/manual/en/function.enchant-broker-get-error.php
* @param resource $broker <p>
* Broker resource.
* </p>
* @return string Return the msg string if an error was found or <b>FALSE</b>
*/
function enchant_broker_get_error($broker): string {}
/**
* (PHP 5 >= 5.3.1, PHP 7, PECL enchant >= 1.0.1)<br/>
* Set the directory path for a given backend
* @link http://php.net/manual/en/function.enchant-broker-set-dict-path.php
* @param resource $broker <p>
* Broker resource.
* </p>
* @param int $dict_type <p>
* The type of the dictionaries, i.e. <b>ENCHANT_MYSPELL</b>
* or <b>ENCHANT_ISPELL</b>.
* </p>
* @param string $value <p>
* The path of the dictionary directory.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_broker_set_dict_path($broker, int $dict_type, string $value): bool {}
/**
* (PHP 5 >= 5.3.1, PHP 7, PECL enchant >= 1.0.1)<br/>
* Get the directory path for a given backend
* @link http://php.net/manual/en/function.enchant-broker-get-dict-path.php
* @param resource $broker <p>
* Broker resource.
* </p>
* @param int $dict_type <p>
* The type of the dictionaries, i.e. <b>ENCHANT_MYSPELL</b>
* or <b>ENCHANT_ISPELL</b>.
* </p>
* @return bool the path of the dictionary directory on
* success or <b>FALSE</b> on failure.
*/
function enchant_broker_get_dict_path($broker, int $dict_type): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 1.0.1)<br/>
* Returns a list of available dictionaries
* @link http://php.net/manual/en/function.enchant-broker-list-dicts.php
* @param resource $broker <p>
* Broker resource
* </p>
* @return mixed <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_broker_list_dicts($broker) {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* create a new dictionary using a tag
* @link http://php.net/manual/en/function.enchant-broker-request-dict.php
* @param resource $broker <p>
* Broker resource
* </p>
* @param string $tag <p>
* A tag describing the locale, for example en_US, de_DE
* </p>
* @return resource a dictionary resource on success or <b>FALSE</b> on failure.
*/
function enchant_broker_request_dict($broker, string $tag) {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* creates a dictionary using a PWL file
* @link http://php.net/manual/en/function.enchant-broker-request-pwl-dict.php
* @param resource $broker <p>
* Broker resource
* </p>
* @param string $filename <p>
* Path to the PWL file.
* If there is no such file, a new one will be created if possible.
* </p>
* @return resource a dictionary resource on success or <b>FALSE</b> on failure.
*/
function enchant_broker_request_pwl_dict($broker, string $filename) {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Free a dictionary resource
* @link http://php.net/manual/en/function.enchant-broker-free-dict.php
* @param resource $dict <p>
* Dictionary resource.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_broker_free_dict($dict): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Whether a dictionary exists or not. Using non-empty tag
* @link http://php.net/manual/en/function.enchant-broker-dict-exists.php
* @param resource $broker <p>
* Broker resource
* </p>
* @param string $tag <p>
* non-empty tag in the LOCALE format, ex: us_US, ch_DE, etc.
* </p>
* @return bool <b>TRUE</b> when the tag exist or <b>FALSE</b> when not.
*/
function enchant_broker_dict_exists($broker, string $tag): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Declares a preference of dictionaries to use for the language
* @link http://php.net/manual/en/function.enchant-broker-set-ordering.php
* @param resource $broker <p>
* Broker resource
* </p>
* @param string $tag <p>
* Language tag. The special "*" tag can be used as a language tag
* to declare a default ordering for any language that does not
* explicitly declare an ordering.
* </p>
* @param string $ordering <p>
* Comma delimited list of provider names
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_broker_set_ordering($broker, string $tag, string $ordering): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0)<br/>
* Enumerates the Enchant providers
* @link http://php.net/manual/en/function.enchant-broker-describe.php
* @param resource $broker <p>
* Broker resource
* </p>
* @return array <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_broker_describe($broker): array {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Check whether a word is correctly spelled or not
* @link http://php.net/manual/en/function.enchant-dict-check.php
* @param resource $dict <p>
* Dictionary resource
* </p>
* @param string $word <p>
* The word to check
* </p>
* @return bool <b>TRUE</b> if the word is spelled correctly, <b>FALSE</b> if not.
*/
function enchant_dict_check($dict, string $word): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Will return a list of values if any of those pre-conditions are not met
* @link http://php.net/manual/en/function.enchant-dict-suggest.php
* @param resource $dict <p>
* Dictionary resource
* </p>
* @param string $word <p>
* Word to use for the suggestions.
* </p>
* @return array Will returns an array of suggestions if the word is bad spelled.
*/
function enchant_dict_suggest($dict, string $word): array {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* add a word to personal word list
* @link http://php.net/manual/en/function.enchant-dict-add-to-personal.php
* @param resource $dict <p>
* Dictionary resource
* </p>
* @param string $word <p>
* The word to add
* </p>
* @return void <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_dict_add_to_personal($dict, string $word) {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* add 'word' to this spell-checking session
* @link http://php.net/manual/en/function.enchant-dict-add-to-session.php
* @param resource $dict <p>
* Dictionary resource
* </p>
* @param string $word <p>
* The word to add
* </p>
* @return void No value is returned.
*/
function enchant_dict_add_to_session($dict, string $word) {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* whether or not 'word' exists in this spelling-session
* @link http://php.net/manual/en/function.enchant-dict-is-in-session.php
* @param resource $dict <p>
* Dictionary resource
* </p>
* @param string $word <p>
* The word to lookup
* </p>
* @return bool <b>TRUE</b> if the word exists or <b>FALSE</b>
*/
function enchant_dict_is_in_session($dict, string $word): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Add a correction for a word
* @link http://php.net/manual/en/function.enchant-dict-store-replacement.php
* @param resource $dict <p>
* Dictionary resource
* </p>
* @param string $mis <p>
* The work to fix
* </p>
* @param string $cor <p>
* The correct word
* </p>
* @return void <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_dict_store_replacement($dict, string $mis, string $cor) {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Returns the last error of the current spelling-session
* @link http://php.net/manual/en/function.enchant-dict-get-error.php
* @param resource $dict <p>
* Dictinaray resource
* </p>
* @return string the error message as string or <b>FALSE</b> if no error occurred.
*/
function enchant_dict_get_error($dict): string {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant >= 0.1.0 )<br/>
* Describes an individual dictionary
* @link http://php.net/manual/en/function.enchant-dict-describe.php
* @param resource $dict <p>
* Dictionary resource
* </p>
* @return mixed <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function enchant_dict_describe($dict) {}
/**
* (PHP 5 >= 5.3.0, PHP 7, PECL enchant:0.2.0-1.0.1)<br/>
* Check the word is correctly spelled and provide suggestions
* @link http://php.net/manual/en/function.enchant-dict-quick-check.php
* @param resource $dict <p>
* Dictionary resource
* </p>
* @param string $word <p>
* The word to check
* </p>
* @param array $suggestions [optional] <p>
* If the word is not correctly spelled, this variable will
* contain an array of suggestions.
* </p>
* @return bool <b>TRUE</b> if the word is correctly spelled or <b>FALSE</b>
*/
function enchant_dict_quick_check($dict, string $word, array &$suggestions = null): bool {}
/**
* Dictionary type for MySpell. Used with
* <b>enchant_broker_get_dict_path</b> and
* <b>enchant_broker_set_dict_path</b>.
* @link http://php.net/manual/en/enchant.constants.php
*/
define ('ENCHANT_MYSPELL', 1);
/**
* Dictionary type for Ispell. Used with
* <b>enchant_broker_get_dict_path</b> and
* <b>enchant_broker_set_dict_path</b>.
* @link http://php.net/manual/en/enchant.constants.php
*/
define ('ENCHANT_ISPELL', 2);
// End of enchant v.1.1.0
?>