locale.stub.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. /** @generate-class-entries */
  3. class Locale
  4. {
  5. /**
  6. * @tentative-return-type
  7. * @alias locale_get_default
  8. */
  9. public static function getDefault(): string {}
  10. /**
  11. * @return bool
  12. * @alias locale_set_default
  13. */
  14. public static function setDefault(string $locale) {} // TODO make return type void
  15. /**
  16. * @tentative-return-type
  17. * @alias locale_get_primary_language
  18. */
  19. public static function getPrimaryLanguage(string $locale): ?string{}
  20. /**
  21. * @tentative-return-type
  22. * @alias locale_get_script
  23. */
  24. public static function getScript(string $locale): ?string {}
  25. /**
  26. * @tentative-return-type
  27. * @alias locale_get_region
  28. */
  29. public static function getRegion(string $locale): ?string {}
  30. /**
  31. * @return array<string, string>|false|null
  32. * @tentative-return-type
  33. * @alias locale_get_keywords
  34. */
  35. public static function getKeywords(string $locale): array|false|null {}
  36. /**
  37. * @tentative-return-type
  38. * @alias locale_get_display_script
  39. */
  40. public static function getDisplayScript(string $locale, ?string $displayLocale = null): string|false {}
  41. /**
  42. * @tentative-return-type
  43. * @alias locale_get_display_region
  44. */
  45. public static function getDisplayRegion(string $locale, ?string $displayLocale = null): string|false {}
  46. /**
  47. * @tentative-return-type
  48. * @alias locale_get_display_name
  49. */
  50. public static function getDisplayName(string $locale, ?string $displayLocale = null): string|false {}
  51. /**
  52. * @tentative-return-type
  53. * @alias locale_get_display_language
  54. */
  55. public static function getDisplayLanguage(string $locale, ?string $displayLocale = null): string|false {}
  56. /**
  57. * @tentative-return-type
  58. * @alias locale_get_display_variant
  59. */
  60. public static function getDisplayVariant(string $locale, ?string $displayLocale = null): string|false {}
  61. /**
  62. * @tentative-return-type
  63. * @alias locale_compose
  64. */
  65. public static function composeLocale(array $subtags): string|false {}
  66. /**
  67. * @tentative-return-type
  68. * @alias locale_parse
  69. */
  70. public static function parseLocale(string $locale): ?array {}
  71. /**
  72. * @tentative-return-type
  73. * @alias locale_get_all_variants
  74. */
  75. public static function getAllVariants(string $locale): ?array {}
  76. /**
  77. * @tentative-return-type
  78. * @alias locale_filter_matches
  79. */
  80. public static function filterMatches(string $languageTag, string $locale, bool $canonicalize = false): ?bool {}
  81. /**
  82. * @tentative-return-type
  83. * @alias locale_lookup
  84. */
  85. public static function lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null): ?string {}
  86. /**
  87. * @tentative-return-type
  88. * @alias locale_canonicalize
  89. */
  90. public static function canonicalize(string $locale): ?string {}
  91. /**
  92. * @tentative-return-type
  93. * @alias locale_accept_from_http
  94. */
  95. public static function acceptFromHttp(string $header): string|false {}
  96. }