msgformat.stub.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /** @generate-class-entries */
  3. class MessageFormatter
  4. {
  5. public function __construct(string $locale, string $pattern) {}
  6. /**
  7. * @tentative-return-type
  8. * @alias msgfmt_create
  9. */
  10. public static function create(string $locale, string $pattern): ?MessageFormatter {}
  11. /**
  12. * @tentative-return-type
  13. * @alias msgfmt_format
  14. */
  15. public function format(array $values): string|false {}
  16. /**
  17. * @tentative-return-type
  18. * @alias msgfmt_format_message
  19. */
  20. public static function formatMessage(string $locale, string $pattern, array $values): string|false {}
  21. /**
  22. * @return array<int, int|float|string>|false
  23. * @tentative-return-type
  24. * @alias msgfmt_parse
  25. */
  26. public function parse(string $string): array|false {}
  27. /**
  28. * @return array<int, int|float|string>|false
  29. * @tentative-return-type
  30. * @alias msgfmt_parse_message
  31. */
  32. public static function parseMessage(string $locale, string $pattern, string $message): array|false {}
  33. /**
  34. * @tentative-return-type
  35. * @alias msgfmt_set_pattern
  36. */
  37. public function setPattern(string $pattern): bool {}
  38. /**
  39. * @tentative-return-type
  40. * @alias msgfmt_get_pattern
  41. */
  42. public function getPattern(): string|false {}
  43. /**
  44. * @tentative-return-type
  45. * @alias msgfmt_get_locale
  46. */
  47. public function getLocale(): string {}
  48. /**
  49. * @tentative-return-type
  50. * @alias msgfmt_get_error_code
  51. */
  52. public function getErrorCode(): int {}
  53. /**
  54. * @tentative-return-type
  55. * @alias msgfmt_get_error_message
  56. */
  57. public function getErrorMessage(): string {}
  58. }