[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /* 4 * This file is part of the Symfony package. 5 * 6 * (c) Fabien Potencier <[email protected]> 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12 use Symfony\Polyfill\Iconv as p; 13 14 if (extension_loaded('iconv')) { 15 return; 16 } 17 18 if (\PHP_VERSION_ID >= 80000) { 19 return require __DIR__.'/bootstrap80.php'; 20 } 21 22 if (!defined('ICONV_IMPL')) { 23 define('ICONV_IMPL', 'Symfony'); 24 } 25 if (!defined('ICONV_VERSION')) { 26 define('ICONV_VERSION', '1.0'); 27 } 28 if (!defined('ICONV_MIME_DECODE_STRICT')) { 29 define('ICONV_MIME_DECODE_STRICT', 1); 30 } 31 if (!defined('ICONV_MIME_DECODE_CONTINUE_ON_ERROR')) { 32 define('ICONV_MIME_DECODE_CONTINUE_ON_ERROR', 2); 33 } 34 35 if (!function_exists('iconv')) { 36 function iconv($from_encoding, $to_encoding, $string) { return p\Iconv::iconv($from_encoding, $to_encoding, $string); } 37 } 38 if (!function_exists('iconv_get_encoding')) { 39 function iconv_get_encoding($type = 'all') { return p\Iconv::iconv_get_encoding($type); } 40 } 41 if (!function_exists('iconv_set_encoding')) { 42 function iconv_set_encoding($type, $encoding) { return p\Iconv::iconv_set_encoding($type, $encoding); } 43 } 44 if (!function_exists('iconv_mime_encode')) { 45 function iconv_mime_encode($field_name, $field_value, $options = []) { return p\Iconv::iconv_mime_encode($field_name, $field_value, $options); } 46 } 47 if (!function_exists('iconv_mime_decode_headers')) { 48 function iconv_mime_decode_headers($headers, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode_headers($headers, $mode, $encoding); } 49 } 50 51 if (extension_loaded('mbstring')) { 52 if (!function_exists('iconv_strlen')) { 53 function iconv_strlen($string, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strlen($string, $encoding); } 54 } 55 if (!function_exists('iconv_strpos')) { 56 function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strpos($haystack, $needle, $offset, $encoding); } 57 } 58 if (!function_exists('iconv_strrpos')) { 59 function iconv_strrpos($haystack, $needle, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_strrpos($haystack, $needle, 0, $encoding); } 60 } 61 if (!function_exists('iconv_substr')) { 62 function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { null === $encoding && $encoding = p\Iconv::$internalEncoding; return mb_substr($string, $offset, $length, $encoding); } 63 } 64 if (!function_exists('iconv_mime_decode')) { 65 function iconv_mime_decode($string, $mode = 0, $encoding = null) { $currentMbEncoding = mb_internal_encoding(); null === $encoding && $encoding = p\Iconv::$internalEncoding; mb_internal_encoding($encoding); $decoded = mb_decode_mimeheader($string); mb_internal_encoding($currentMbEncoding); return $decoded; } 66 } 67 } else { 68 if (!function_exists('iconv_strlen')) { 69 if (extension_loaded('xml')) { 70 function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen1($string, $encoding); } 71 } else { 72 function iconv_strlen($string, $encoding = null) { return p\Iconv::strlen2($string, $encoding); } 73 } 74 } 75 76 if (!function_exists('iconv_strpos')) { 77 function iconv_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Iconv::iconv_strpos($haystack, $needle, $offset, $encoding); } 78 } 79 if (!function_exists('iconv_strrpos')) { 80 function iconv_strrpos($haystack, $needle, $encoding = null) { return p\Iconv::iconv_strrpos($haystack, $needle, $encoding); } 81 } 82 if (!function_exists('iconv_substr')) { 83 function iconv_substr($string, $offset, $length = 2147483647, $encoding = null) { return p\Iconv::iconv_substr($string, $offset, $length, $encoding); } 84 } 85 if (!function_exists('iconv_mime_decode')) { 86 function iconv_mime_decode($string, $mode = 0, $encoding = null) { return p\Iconv::iconv_mime_decode($string, $mode, $encoding); } 87 } 88 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |