Debian Codegraph @

codelitephp/resources/cc/iconv.php

raw
1 <?php
2
3 // Start of iconv v.
4
5 /**
6 * Convert string to requested character encoding
7 * @link http://www.php.net/manual/en/function.iconv.php
8 * @param in_charset string <p>
9 * The input charset.
10 * </p>
11 * @param out_charset string <p>
12 * The output charset.
13 * </p>
14 * <p>
15 * If you append the string //TRANSLIT to
16 * out_charset transliteration is activated. This
17 * means that when a character can't be represented in the target charset,
18 * it can be approximated through one or several similarly looking
19 * characters. If you append the string //IGNORE,
20 * characters that cannot be represented in the target charset are silently
21 * discarded. Otherwise, str is cut from the first
22 * illegal character and an E_NOTICE is generated.
23 * </p>
24 * @param str string <p>
25 * The string to be converted.
26 * </p>
27 * @return string the converted string&return.falseforfailure;.
28 */
29 function iconv ($in_charset, $out_charset, $str) {}
30
31 /**
32 * Retrieve internal configuration variables of iconv extension
33 * @link http://www.php.net/manual/en/function.iconv-get-encoding.php
34 * @param type string[optional] <p>
35 * The value of the optional type can be:
36 *
37 * all
38 * input_encoding
39 * output_encoding
40 * internal_encoding
41 *
42 * </p>
43 * @return mixed the current value of the internal configuration variable if
44 * successful&return.falseforfailure;.
45 * </p>
46 * <p>
47 * If type is omitted or set to "all",
48 * iconv_get_encoding returns an array that
49 * stores all these variables.
50 */
51 function iconv_get_encoding ($type = null) {}
52
53 /**
54 * Set current setting for character encoding conversion
55 * @link http://www.php.net/manual/en/function.iconv-set-encoding.php
56 * @param type string <p>
57 * The value of type can be any one of these:
58 *
59 * input_encoding
60 * output_encoding
61 * internal_encoding
62 *
63 * </p>
64 * @param charset string <p>
65 * The character set.
66 * </p>
67 * @return bool Returns true on success, false on failure.
68 */
69 function iconv_set_encoding ($type, $charset) {}
70
71 /**
72 * Returns the character count of string
73 * @link http://www.php.net/manual/en/function.iconv-strlen.php
74 * @param str string <p>
75 * The string.
76 * </p>
77 * @param charset string[optional] <p>
78 * If charset parameter is omitted,
79 * str is assumed to be encoded in
80 * iconv.internal_encoding.
81 * </p>
82 * @return int the character count of str, as an integer.
83 */
84 function iconv_strlen ($str, $charset = null) {}
85
86 /**
87 * Cut out part of a string
88 * @link http://www.php.net/manual/en/function.iconv-substr.php
89 * @param str string <p>
90 * The original string.
91 * </p>
92 * @param offset int <p>
93 * If offset is non-negative,
94 * iconv_substr cuts the portion out of
95 * str beginning at offset'th
96 * character, counting from zero.
97 * </p>
98 * <p>
99 * If offset is negative,
100 * iconv_substr cuts out the portion beginning
101 * at the position, offset characters
102 * away from the end of str.
103 * </p>
104 * @param length int[optional] <p>
105 * If length is given and is positive, the return
106 * value will contain at most length characters
107 * of the portion that begins at offset
108 * (depending on the length of string).
109 * </p>
110 * <p>
111 * If negative length is passed,
112 * iconv_substr cuts the portion out of
113 * str from the offset'th
114 * character up to the character that is
115 * length characters away from the end of the string.
116 * In case offset is also negative, the start position
117 * is calculated beforehand according to the rule explained above.
118 * </p>
119 * @param charset string[optional] <p>
120 * If charset parameter is omitted,
121 * string are assumed to be encoded in
122 * iconv.internal_encoding.
123 * </p>
124 * <p>
125 * Note that offset and length
126 * parameters are always deemed to represent offsets that are
127 * calculated on the basis of the character set determined by
128 * charset, whilst the counterpart
129 * substr always takes these for byte offsets.
130 * </p>
131 * @return string the portion of str specified by the
132 * offset and length parameters.
133 * </p>
134 * <p>
135 * If str is shorter than offset
136 * characters long, false will be returned.
137 */
138 function iconv_substr ($str, $offset, $length = null, $charset = null) {}
139
140 /**
141 * Finds position of first occurrence of a needle within a haystack
142 * @link http://www.php.net/manual/en/function.iconv-strpos.php
143 * @param haystack string <p>
144 * The entire string.
145 * </p>
146 * @param needle string <p>
147 * The searched substring.
148 * </p>
149 * @param offset int[optional] <p>
150 * The optional offset parameter specifies
151 * the position from which the search should be performed.
152 * </p>
153 * @param charset string[optional] <p>
154 * If charset parameter is omitted,
155 * string are assumed to be encoded in
156 * iconv.internal_encoding.
157 * </p>
158 * @return int the numeric position of the first occurrence of
159 * needle in haystack.
160 * </p>
161 * <p>
162 * If needle is not found,
163 * iconv_strpos will return false.
164 */
165 function iconv_strpos ($haystack, $needle, $offset = null, $charset = null) {}
166
167 /**
168 * Finds the last occurrence of a needle within a haystack
169 * @link http://www.php.net/manual/en/function.iconv-strrpos.php
170 * @param haystack string <p>
171 * The entire string.
172 * </p>
173 * @param needle string <p>
174 * The searched substring.
175 * </p>
176 * @param charset string[optional] <p>
177 * If charset parameter is omitted,
178 * string are assumed to be encoded in
179 * iconv.internal_encoding.
180 * </p>
181 * @return int the numeric position of the last occurrence of
182 * needle in haystack.
183 * </p>
184 * <p>
185 * If needle is not found,
186 * iconv_strrpos will return false.
187 */
188 function iconv_strrpos ($haystack, $needle, $charset = null) {}
189
190 /**
191 * Composes a <literal>MIME</literal> header field
192 * @link http://www.php.net/manual/en/function.iconv-mime-encode.php
193 * @param field_name string <p>
194 * The field name.
195 * </p>
196 * @param field_value string <p>
197 * The field value.
198 * </p>
199 * @param preferences array[optional] <p>
200 * You can control the behaviour of iconv_mime_encode
201 * by specifying an associative array that contains configuration items
202 * to the optional third parameter preferences.
203 * The items supported by iconv_mime_encode are
204 * listed below. Note that item names are treated case-sensitive.
205 * <table>
206 * Configuration items supported by iconv_mime_encode
207 *
208 *
209 * <tr valign="top">
210 * <td>Item</td>
211 * <td>Type</td>
212 * <td>Description</td>
213 * <td>Default value</td>
214 * <td>Example</td>
215 * </tr>
216 *
217 *
218 * <tr valign="top">
219 * <td>scheme</td>
220 * <td>string</td>
221 * <td>
222 * Specifies the method to encode a field value by. The value of
223 * this item may be either "B" or "Q", where "B" stands for
224 * base64 encoding scheme and "Q" stands for
225 * quoted-printable encoding scheme.
226 * </td>
227 * <td>B</td>
228 * <td>B</td>
229 * </tr>
230 * <tr valign="top">
231 * <td>input-charset</td>
232 * <td>string</td>
233 * <td>
234 * Specifies the character set in which the first parameter
235 * field_name and the second parameter
236 * field_value are presented. If not given,
237 * iconv_mime_encode assumes those parameters
238 * are presented to it in the
239 * iconv.internal_encoding
240 * ini setting.
241 * </td>
242 * <td>
243 * iconv.internal_encoding
244 * </td>
245 * <td>ISO-8859-1</td>
246 * </tr>
247 * <tr valign="top">
248 * <td>output-charset</td>
249 * <td>string</td>
250 * <td>
251 * Specifies the character set to use to compose the
252 * MIME header.
253 * </td>
254 * <td>
255 * iconv.internal_encoding
256 * </td>
257 * <td>UTF-8</td>
258 * </tr>
259 * <tr valign="top">
260 * <td>line-length</td>
261 * <td>integer</td>
262 * <td>
263 * Specifies the maximum length of the header lines. The resulting
264 * header is "folded" to a set of multiple lines in case
265 * the resulting header field would be longer than the value of this
266 * parameter, according to
267 * RFC2822 - Internet Message Format.
268 * If not given, the length will be limited to 76 characters.
269 * </td>
270 * <td>76</td>
271 * <td>996</td>
272 * </tr>
273 * <tr valign="top">
274 * <td>line-break-chars</td>
275 * <td>string</td>
276 * <td>
277 * Specifies the sequence of characters to append to each line
278 * as an end-of-line sign when "folding" is performed on a long header
279 * field. If not given, this defaults to "\r\n"
280 * (CR LF). Note that
281 * this parameter is always treated as an ASCII string regardless
282 * of the value of input-charset.
283 * </td>
284 * <td>\r\n</td>
285 * <td>\n</td>
286 * </tr>
287 *
288 *
289 * </table>
290 * </p>
291 * @return string an encoded MIME field on success,
292 * or false if an error occurs during the encoding.
293 */
294 function iconv_mime_encode ($field_name, $field_value, array $preferences = null) {}
295
296 /**
297 * Decodes a <literal>MIME</literal> header field
298 * @link http://www.php.net/manual/en/function.iconv-mime-decode.php
299 * @param encoded_header string <p>
300 * The encoded header, as a string.
301 * </p>
302 * @param mode int[optional] <p>
303 * mode determines the behaviour in the event
304 * iconv_mime_decode encounters a malformed
305 * MIME header field. You can specify any combination
306 * of the following bitmasks.
307 * <table>
308 * Bitmasks acceptable to iconv_mime_decode
309 *
310 *
311 * <tr valign="top">
312 * <td>Value</td>
313 * <td>Constant</td>
314 * <td>Description</td>
315 * </tr>
316 *
317 *
318 * <tr valign="top">
319 * <td>1</td>
320 * <td>ICONV_MIME_DECODE_STRICT</td>
321 * <td>
322 * If set, the given header is decoded in full conformance with the
323 * standards defined in RFC2047.
324 * This option is disabled by default because there are a lot of
325 * broken mail user agents that don't follow the specification and don't
326 * produce correct MIME headers.
327 * </td>
328 * </tr>
329 * <tr valign="top">
330 * <td>2</td>
331 * <td>ICONV_MIME_DECODE_CONTINUE_ON_ERROR</td>
332 * <td>
333 * If set, iconv_mime_decode_headers
334 * attempts to ignore any grammatical errors and continue to process
335 * a given header.
336 * </td>
337 * </tr>
338 *
339 *
340 * </table>
341 * </p>
342 * @param charset string[optional] <p>
343 * The optional charset parameter specifies the
344 * character set to represent the result by. If omitted,
345 * iconv.internal_encoding
346 * will be used.
347 * </p>
348 * @return string a decoded MIME field on success,
349 * or false if an error occurs during the decoding.
350 */
351 function iconv_mime_decode ($encoded_header, $mode = null, $charset = null) {}
352
353 /**
354 * Decodes multiple <literal>MIME</literal> header fields at once
355 * @link http://www.php.net/manual/en/function.iconv-mime-decode-headers.php
356 * @param encoded_headers string <p>
357 * The encoded headers, as a string.
358 * </p>
359 * @param mode int[optional] <p>
360 * mode determines the behaviour in the event
361 * iconv_mime_decode_headers encounters a malformed
362 * MIME header field. You can specify any combination
363 * of the following bitmasks.
364 * <table>
365 * Bitmasks acceptable to iconv_mime_decode_headers
366 *
367 *
368 * <tr valign="top">
369 * <td>Value</td>
370 * <td>Constant</td>
371 * <td>Description</td>
372 * </tr>
373 *
374 *
375 * <tr valign="top">
376 * <td>1</td>
377 * <td>ICONV_MIME_DECODE_STRICT</td>
378 * <td>
379 * If set, the given header is decoded in full conformance with the
380 * standards defined in RFC2047.
381 * This option is disabled by default because there are a lot of
382 * broken mail user agents that don't follow the specification and don't
383 * produce correct MIME headers.
384 * </td>
385 * </tr>
386 * <tr valign="top">
387 * <td>2</td>
388 * <td>ICONV_MIME_DECODE_CONTINUE_ON_ERROR</td>
389 * <td>
390 * If set, iconv_mime_decode_headers
391 * attempts to ignore any grammatical errors and continue to process
392 * a given header.
393 * </td>
394 * </tr>
395 *
396 *
397 * </table>
398 * </p>
399 * @param charset string[optional] <p>
400 * The optional charset parameter specifies the
401 * character set to represent the result by. If omitted,
402 * iconv.internal_encoding
403 * will be used.
404 * </p>
405 * @return array an associative array that holds a whole set of
406 * MIME header fields specified by
407 * encoded_headers on success, or false
408 * if an error occurs during the decoding.
409 * </p>
410 * <p>
411 * Each key of the return value represents an individual
412 * field name and the corresponding element represents a field value.
413 * If more than one field of the same name are present,
414 * iconv_mime_decode_headers automatically incorporates
415 * them into a numerically indexed array in the order of occurrence.
416 */
417 function iconv_mime_decode_headers ($encoded_headers, $mode = null, $charset = null) {}
418
419
420 /**
421 * string
422 * @link http://www.php.net/manual/en/iconv.constants.php
423 */
424 define ('ICONV_IMPL', "glibc");
425
426 /**
427 * string
428 * @link http://www.php.net/manual/en/iconv.constants.php
429 */
430 define ('ICONV_VERSION', 2.19);
431
432 /**
433 * integer
434 * @link http://www.php.net/manual/en/iconv.constants.php
435 */
436 define ('ICONV_MIME_DECODE_STRICT', 1);
437
438 /**
439 * integer
440 * @link http://www.php.net/manual/en/iconv.constants.php
441 */
442 define ('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2);
443
444 // End of iconv v.
445 ?>