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