PageRenderTime 27ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/mailpoet/vendor-prefixed/symfony/polyfill-mbstring/bootstrap.php

https://gitlab.com/remyvianne/krowkaramel
PHP | 244 lines | 244 code | 0 blank | 0 comment | 43 complexity | 775f06bc152e97a66580bc4372fa6a13 MD5 | raw file
  1. <?php
  2. if (!defined('ABSPATH')) exit;
  3. use MailPoetVendor\Symfony\Polyfill\Mbstring as p;
  4. if (!\function_exists('mb_convert_encoding')) {
  5. function mb_convert_encoding($s, $to, $from = null)
  6. {
  7. return p\Mbstring::mb_convert_encoding($s, $to, $from);
  8. }
  9. }
  10. if (!\function_exists('mb_decode_mimeheader')) {
  11. function mb_decode_mimeheader($s)
  12. {
  13. return p\Mbstring::mb_decode_mimeheader($s);
  14. }
  15. }
  16. if (!\function_exists('mb_encode_mimeheader')) {
  17. function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null)
  18. {
  19. return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent);
  20. }
  21. }
  22. if (!\function_exists('mb_decode_numericentity')) {
  23. function mb_decode_numericentity($s, $convmap, $enc = null)
  24. {
  25. return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc);
  26. }
  27. }
  28. if (!\function_exists('mb_encode_numericentity')) {
  29. function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = \false)
  30. {
  31. return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex);
  32. }
  33. }
  34. if (!\function_exists('mb_convert_case')) {
  35. function mb_convert_case($s, $mode, $enc = null)
  36. {
  37. return p\Mbstring::mb_convert_case($s, $mode, $enc);
  38. }
  39. }
  40. if (!\function_exists('mb_internal_encoding')) {
  41. function mb_internal_encoding($enc = null)
  42. {
  43. return p\Mbstring::mb_internal_encoding($enc);
  44. }
  45. }
  46. if (!\function_exists('mb_language')) {
  47. function mb_language($lang = null)
  48. {
  49. return p\Mbstring::mb_language($lang);
  50. }
  51. }
  52. if (!\function_exists('mb_list_encodings')) {
  53. function mb_list_encodings()
  54. {
  55. return p\Mbstring::mb_list_encodings();
  56. }
  57. }
  58. if (!\function_exists('mb_encoding_aliases')) {
  59. function mb_encoding_aliases($encoding)
  60. {
  61. return p\Mbstring::mb_encoding_aliases($encoding);
  62. }
  63. }
  64. if (!\function_exists('mb_check_encoding')) {
  65. function mb_check_encoding($var = null, $encoding = null)
  66. {
  67. return p\Mbstring::mb_check_encoding($var, $encoding);
  68. }
  69. }
  70. if (!\function_exists('mb_detect_encoding')) {
  71. function mb_detect_encoding($str, $encodingList = null, $strict = \false)
  72. {
  73. return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict);
  74. }
  75. }
  76. if (!\function_exists('mb_detect_order')) {
  77. function mb_detect_order($encodingList = null)
  78. {
  79. return p\Mbstring::mb_detect_order($encodingList);
  80. }
  81. }
  82. if (!\function_exists('mb_parse_str')) {
  83. function mb_parse_str($s, &$result = array())
  84. {
  85. \parse_str($s, $result);
  86. }
  87. }
  88. if (!\function_exists('mb_strlen')) {
  89. function mb_strlen($s, $enc = null)
  90. {
  91. return p\Mbstring::mb_strlen($s, $enc);
  92. }
  93. }
  94. if (!\function_exists('mb_strpos')) {
  95. function mb_strpos($s, $needle, $offset = 0, $enc = null)
  96. {
  97. return p\Mbstring::mb_strpos($s, $needle, $offset, $enc);
  98. }
  99. }
  100. if (!\function_exists('mb_strtolower')) {
  101. function mb_strtolower($s, $enc = null)
  102. {
  103. return p\Mbstring::mb_strtolower($s, $enc);
  104. }
  105. }
  106. if (!\function_exists('mb_strtoupper')) {
  107. function mb_strtoupper($s, $enc = null)
  108. {
  109. return p\Mbstring::mb_strtoupper($s, $enc);
  110. }
  111. }
  112. if (!\function_exists('mb_substitute_character')) {
  113. function mb_substitute_character($char = null)
  114. {
  115. return p\Mbstring::mb_substitute_character($char);
  116. }
  117. }
  118. if (!\function_exists('mb_substr')) {
  119. function mb_substr($s, $start, $length = 2147483647, $enc = null)
  120. {
  121. return p\Mbstring::mb_substr($s, $start, $length, $enc);
  122. }
  123. }
  124. if (!\function_exists('mb_stripos')) {
  125. function mb_stripos($s, $needle, $offset = 0, $enc = null)
  126. {
  127. return p\Mbstring::mb_stripos($s, $needle, $offset, $enc);
  128. }
  129. }
  130. if (!\function_exists('mb_stristr')) {
  131. function mb_stristr($s, $needle, $part = \false, $enc = null)
  132. {
  133. return p\Mbstring::mb_stristr($s, $needle, $part, $enc);
  134. }
  135. }
  136. if (!\function_exists('mb_strrchr')) {
  137. function mb_strrchr($s, $needle, $part = \false, $enc = null)
  138. {
  139. return p\Mbstring::mb_strrchr($s, $needle, $part, $enc);
  140. }
  141. }
  142. if (!\function_exists('mb_strrichr')) {
  143. function mb_strrichr($s, $needle, $part = \false, $enc = null)
  144. {
  145. return p\Mbstring::mb_strrichr($s, $needle, $part, $enc);
  146. }
  147. }
  148. if (!\function_exists('mb_strripos')) {
  149. function mb_strripos($s, $needle, $offset = 0, $enc = null)
  150. {
  151. return p\Mbstring::mb_strripos($s, $needle, $offset, $enc);
  152. }
  153. }
  154. if (!\function_exists('mb_strrpos')) {
  155. function mb_strrpos($s, $needle, $offset = 0, $enc = null)
  156. {
  157. return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc);
  158. }
  159. }
  160. if (!\function_exists('mb_strstr')) {
  161. function mb_strstr($s, $needle, $part = \false, $enc = null)
  162. {
  163. return p\Mbstring::mb_strstr($s, $needle, $part, $enc);
  164. }
  165. }
  166. if (!\function_exists('mb_get_info')) {
  167. function mb_get_info($type = 'all')
  168. {
  169. return p\Mbstring::mb_get_info($type);
  170. }
  171. }
  172. if (!\function_exists('mb_http_output')) {
  173. function mb_http_output($enc = null)
  174. {
  175. return p\Mbstring::mb_http_output($enc);
  176. }
  177. }
  178. if (!\function_exists('mb_strwidth')) {
  179. function mb_strwidth($s, $enc = null)
  180. {
  181. return p\Mbstring::mb_strwidth($s, $enc);
  182. }
  183. }
  184. if (!\function_exists('mb_substr_count')) {
  185. function mb_substr_count($haystack, $needle, $enc = null)
  186. {
  187. return p\Mbstring::mb_substr_count($haystack, $needle, $enc);
  188. }
  189. }
  190. if (!\function_exists('mb_output_handler')) {
  191. function mb_output_handler($contents, $status)
  192. {
  193. return p\Mbstring::mb_output_handler($contents, $status);
  194. }
  195. }
  196. if (!\function_exists('mb_http_input')) {
  197. function mb_http_input($type = '')
  198. {
  199. return p\Mbstring::mb_http_input($type);
  200. }
  201. }
  202. if (!\function_exists('mb_convert_variables')) {
  203. function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null)
  204. {
  205. return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f);
  206. }
  207. }
  208. if (!\function_exists('mb_ord')) {
  209. function mb_ord($s, $enc = null)
  210. {
  211. return p\Mbstring::mb_ord($s, $enc);
  212. }
  213. }
  214. if (!\function_exists('mb_chr')) {
  215. function mb_chr($code, $enc = null)
  216. {
  217. return p\Mbstring::mb_chr($code, $enc);
  218. }
  219. }
  220. if (!\function_exists('mb_scrub')) {
  221. function mb_scrub($s, $enc = null)
  222. {
  223. $enc = null === $enc ? \mb_internal_encoding() : $enc;
  224. return \mb_convert_encoding($s, $enc, $enc);
  225. }
  226. }
  227. if (!\function_exists('mb_str_split')) {
  228. function mb_str_split($string, $split_length = 1, $encoding = null)
  229. {
  230. return p\Mbstring::mb_str_split($string, $split_length, $encoding);
  231. }
  232. }
  233. if (\extension_loaded('mbstring')) {
  234. return;
  235. }
  236. if (!\defined('MB_CASE_UPPER')) {
  237. \define('MB_CASE_UPPER', 0);
  238. }
  239. if (!\defined('MB_CASE_LOWER')) {
  240. \define('MB_CASE_LOWER', 1);
  241. }
  242. if (!\defined('MB_CASE_TITLE')) {
  243. \define('MB_CASE_TITLE', 2);
  244. }