bootstrap.php 906 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. use Symfony\Polyfill\Intl\Icu as p;
  11. if (extension_loaded('intl')) {
  12. return;
  13. }
  14. if (\PHP_VERSION_ID >= 80000) {
  15. return require __DIR__.'/bootstrap80.php';
  16. }
  17. if (!function_exists('intl_is_failure')) {
  18. function intl_is_failure($errorCode) { return p\Icu::isFailure($errorCode); }
  19. }
  20. if (!function_exists('intl_get_error_code')) {
  21. function intl_get_error_code() { return p\Icu::getErrorCode(); }
  22. }
  23. if (!function_exists('intl_get_error_message')) {
  24. function intl_get_error_message() { return p\Icu::getErrorMessage(); }
  25. }
  26. if (!function_exists('intl_error_name')) {
  27. function intl_error_name($errorCode) { return p\Icu::getErrorName($errorCode); }
  28. }