Resources
3 years ago
Idn.php
2 months ago
Info.php
4 years ago
bootstrap.php
2 years ago
bootstrap80.php
2 years ago
index.php
3 years ago
bootstrap80.php
122 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Symfony\Polyfill\Intl\Idn as p; |
| 5 | if (!\defined('U_IDNA_PROHIBITED_ERROR')) { |
| 6 | \define('U_IDNA_PROHIBITED_ERROR', 66560); |
| 7 | } |
| 8 | if (!\defined('U_IDNA_ERROR_START')) { |
| 9 | \define('U_IDNA_ERROR_START', 66560); |
| 10 | } |
| 11 | if (!\defined('U_IDNA_UNASSIGNED_ERROR')) { |
| 12 | \define('U_IDNA_UNASSIGNED_ERROR', 66561); |
| 13 | } |
| 14 | if (!\defined('U_IDNA_CHECK_BIDI_ERROR')) { |
| 15 | \define('U_IDNA_CHECK_BIDI_ERROR', 66562); |
| 16 | } |
| 17 | if (!\defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { |
| 18 | \define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); |
| 19 | } |
| 20 | if (!\defined('U_IDNA_ACE_PREFIX_ERROR')) { |
| 21 | \define('U_IDNA_ACE_PREFIX_ERROR', 66564); |
| 22 | } |
| 23 | if (!\defined('U_IDNA_VERIFICATION_ERROR')) { |
| 24 | \define('U_IDNA_VERIFICATION_ERROR', 66565); |
| 25 | } |
| 26 | if (!\defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { |
| 27 | \define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); |
| 28 | } |
| 29 | if (!\defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { |
| 30 | \define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); |
| 31 | } |
| 32 | if (!\defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { |
| 33 | \define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); |
| 34 | } |
| 35 | if (!\defined('U_IDNA_ERROR_LIMIT')) { |
| 36 | \define('U_IDNA_ERROR_LIMIT', 66569); |
| 37 | } |
| 38 | if (!\defined('U_STRINGPREP_PROHIBITED_ERROR')) { |
| 39 | \define('U_STRINGPREP_PROHIBITED_ERROR', 66560); |
| 40 | } |
| 41 | if (!\defined('U_STRINGPREP_UNASSIGNED_ERROR')) { |
| 42 | \define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); |
| 43 | } |
| 44 | if (!\defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { |
| 45 | \define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); |
| 46 | } |
| 47 | if (!\defined('IDNA_DEFAULT')) { |
| 48 | \define('IDNA_DEFAULT', 0); |
| 49 | } |
| 50 | if (!\defined('IDNA_ALLOW_UNASSIGNED')) { |
| 51 | \define('IDNA_ALLOW_UNASSIGNED', 1); |
| 52 | } |
| 53 | if (!\defined('IDNA_USE_STD3_RULES')) { |
| 54 | \define('IDNA_USE_STD3_RULES', 2); |
| 55 | } |
| 56 | if (!\defined('IDNA_CHECK_BIDI')) { |
| 57 | \define('IDNA_CHECK_BIDI', 4); |
| 58 | } |
| 59 | if (!\defined('IDNA_CHECK_CONTEXTJ')) { |
| 60 | \define('IDNA_CHECK_CONTEXTJ', 8); |
| 61 | } |
| 62 | if (!\defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { |
| 63 | \define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); |
| 64 | } |
| 65 | if (!\defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { |
| 66 | \define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); |
| 67 | } |
| 68 | if (!\defined('INTL_IDNA_VARIANT_UTS46')) { |
| 69 | \define('INTL_IDNA_VARIANT_UTS46', 1); |
| 70 | } |
| 71 | if (!\defined('IDNA_ERROR_EMPTY_LABEL')) { |
| 72 | \define('IDNA_ERROR_EMPTY_LABEL', 1); |
| 73 | } |
| 74 | if (!\defined('IDNA_ERROR_LABEL_TOO_LONG')) { |
| 75 | \define('IDNA_ERROR_LABEL_TOO_LONG', 2); |
| 76 | } |
| 77 | if (!\defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { |
| 78 | \define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); |
| 79 | } |
| 80 | if (!\defined('IDNA_ERROR_LEADING_HYPHEN')) { |
| 81 | \define('IDNA_ERROR_LEADING_HYPHEN', 8); |
| 82 | } |
| 83 | if (!\defined('IDNA_ERROR_TRAILING_HYPHEN')) { |
| 84 | \define('IDNA_ERROR_TRAILING_HYPHEN', 16); |
| 85 | } |
| 86 | if (!\defined('IDNA_ERROR_HYPHEN_3_4')) { |
| 87 | \define('IDNA_ERROR_HYPHEN_3_4', 32); |
| 88 | } |
| 89 | if (!\defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { |
| 90 | \define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); |
| 91 | } |
| 92 | if (!\defined('IDNA_ERROR_DISALLOWED')) { |
| 93 | \define('IDNA_ERROR_DISALLOWED', 128); |
| 94 | } |
| 95 | if (!\defined('IDNA_ERROR_PUNYCODE')) { |
| 96 | \define('IDNA_ERROR_PUNYCODE', 256); |
| 97 | } |
| 98 | if (!\defined('IDNA_ERROR_LABEL_HAS_DOT')) { |
| 99 | \define('IDNA_ERROR_LABEL_HAS_DOT', 512); |
| 100 | } |
| 101 | if (!\defined('IDNA_ERROR_INVALID_ACE_LABEL')) { |
| 102 | \define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); |
| 103 | } |
| 104 | if (!\defined('IDNA_ERROR_BIDI')) { |
| 105 | \define('IDNA_ERROR_BIDI', 2048); |
| 106 | } |
| 107 | if (!\defined('IDNA_ERROR_CONTEXTJ')) { |
| 108 | \define('IDNA_ERROR_CONTEXTJ', 4096); |
| 109 | } |
| 110 | if (!\function_exists('idn_to_ascii')) { |
| 111 | function idn_to_ascii(?string $domain, ?int $flags = \IDNA_DEFAULT, ?int $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) : string|false |
| 112 | { |
| 113 | return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); |
| 114 | } |
| 115 | } |
| 116 | if (!\function_exists('idn_to_utf8')) { |
| 117 | function idn_to_utf8(?string $domain, ?int $flags = \IDNA_DEFAULT, ?int $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) : string|false |
| 118 | { |
| 119 | return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); |
| 120 | } |
| 121 | } |
| 122 |