collator.stub.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /** @generate-class-entries */
  3. class Collator
  4. {
  5. public function __construct(string $locale) {}
  6. /**
  7. * @tentative-return-type
  8. * @alias collator_create
  9. */
  10. public static function create(string $locale): ?Collator {}
  11. /**
  12. * @tentative-return-type
  13. * @alias collator_compare
  14. */
  15. public function compare(string $string1, string $string2): int|false {}
  16. /**
  17. * @tentative-return-type
  18. * @alias collator_sort
  19. */
  20. public function sort(array &$array, int $flags = Collator::SORT_REGULAR): bool {}
  21. /**
  22. * @tentative-return-type
  23. * @alias collator_sort_with_sort_keys
  24. */
  25. public function sortWithSortKeys(array &$array): bool {}
  26. /**
  27. * @tentative-return-type
  28. * @alias collator_asort
  29. */
  30. public function asort(array &$array, int $flags = Collator::SORT_REGULAR): bool {}
  31. /**
  32. * @tentative-return-type
  33. * @alias collator_get_attribute
  34. */
  35. public function getAttribute(int $attribute): int|false {}
  36. /**
  37. * @tentative-return-type
  38. * @alias collator_set_attribute
  39. */
  40. public function setAttribute(int $attribute, int $value): bool {}
  41. /**
  42. * @tentative-return-type
  43. * @alias collator_get_strength
  44. */
  45. public function getStrength(): int {}
  46. /**
  47. * @return bool
  48. * @alias collator_set_strength
  49. */
  50. public function setStrength(int $strength) {} // TODO make return type void
  51. /**
  52. * @tentative-return-type
  53. * @alias collator_get_locale
  54. */
  55. public function getLocale(int $type): string|false {}
  56. /**
  57. * @tentative-return-type
  58. * @alias collator_get_error_code
  59. */
  60. public function getErrorCode(): int|false {}
  61. /**
  62. * @tentative-return-type
  63. * @alias collator_get_error_message
  64. */
  65. public function getErrorMessage(): string|false {}
  66. /**
  67. * @tentative-return-type
  68. * @alias collator_get_sort_key
  69. */
  70. public function getSortKey(string $string): string|false {}
  71. }