breakiterator.stub.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /** @generate-class-entries */
  3. class IntlBreakIterator implements IteratorAggregate
  4. {
  5. /** @tentative-return-type */
  6. public static function createCharacterInstance(?string $locale = null): ?IntlBreakIterator {}
  7. /** @tentative-return-type */
  8. public static function createCodePointInstance(): IntlCodePointBreakIterator {}
  9. /** @tentative-return-type */
  10. public static function createLineInstance(?string $locale = null): ?IntlBreakIterator {}
  11. /** @tentative-return-type */
  12. public static function createSentenceInstance(?string $locale = null): ?IntlBreakIterator {}
  13. /** @tentative-return-type */
  14. public static function createTitleInstance(?string $locale = null): ?IntlBreakIterator {}
  15. /** @tentative-return-type */
  16. public static function createWordInstance(?string $locale = null): ?IntlBreakIterator {}
  17. private function __construct() {}
  18. /** @tentative-return-type */
  19. public function current(): int {}
  20. /** @tentative-return-type */
  21. public function first(): int {}
  22. /** @tentative-return-type */
  23. public function following(int $offset): int {}
  24. /** @tentative-return-type */
  25. public function getErrorCode(): int {}
  26. /** @tentative-return-type */
  27. public function getErrorMessage(): string {}
  28. /** @tentative-return-type */
  29. public function getLocale(int $type): string|false {}
  30. /** @tentative-return-type */
  31. public function getPartsIterator(string $type = IntlPartsIterator::KEY_SEQUENTIAL): IntlPartsIterator {}
  32. /** @tentative-return-type */
  33. public function getText(): ?string {}
  34. /** @tentative-return-type */
  35. public function isBoundary(int $offset): bool {}
  36. /** @tentative-return-type */
  37. public function last(): int {}
  38. /** @tentative-return-type */
  39. public function next(?int $offset = null): int {}
  40. /** @tentative-return-type */
  41. public function preceding(int $offset): int {}
  42. /** @tentative-return-type */
  43. public function previous(): int {}
  44. /** @tentative-return-type */
  45. public function setText(string $text): ?bool {} // TODO return false instead of null in case of failure
  46. public function getIterator(): Iterator {}
  47. }
  48. class IntlRuleBasedBreakIterator extends IntlBreakIterator
  49. {
  50. public function __construct(string $rules, bool $compiled = false) {}
  51. /** @tentative-return-type */
  52. public function getBinaryRules(): string|false {}
  53. /** @tentative-return-type */
  54. public function getRules(): string|false {}
  55. /** @tentative-return-type */
  56. public function getRuleStatus(): int {}
  57. /** @tentative-return-type */
  58. public function getRuleStatusVec(): array|false {}
  59. }
  60. class IntlCodePointBreakIterator extends IntlBreakIterator
  61. {
  62. /** @tentative-return-type */
  63. public function getLastCodePoint(): int {}
  64. }