forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollator.stub.php
229 lines (204 loc) · 4.53 KB
/
collator.stub.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<?php
/** @generate-class-entries */
/**
* @var int
* @cvalue ULOC_ACTUAL_LOCALE
*/
const ULOC_ACTUAL_LOCALE = UNKNOWN;
/**
* @var int
* @cvalue ULOC_VALID_LOCALE
*/
const ULOC_VALID_LOCALE = UNKNOWN;
/** @not-serializable */
class Collator
{
/**
* @var int
* @cvalue UCOL_DEFAULT
*/
const DEFAULT_VALUE = UNKNOWN;
/**
* @var int
* @cvalue UCOL_PRIMARY
*/
const PRIMARY = UNKNOWN;
/**
* @var int
* @cvalue UCOL_SECONDARY
*/
const SECONDARY = UNKNOWN;
/**
* @var int
* @cvalue UCOL_TERTIARY
*/
const TERTIARY = UNKNOWN;
/**
* @var int
* @cvalue UCOL_DEFAULT_STRENGTH
*/
const DEFAULT_STRENGTH = UNKNOWN;
/**
* @var int
* @cvalue UCOL_QUATERNARY
*/
const QUATERNARY = UNKNOWN;
/**
* @var int
* @cvalue UCOL_IDENTICAL
*/
const IDENTICAL = UNKNOWN;
/**
* @var int
* @cvalue UCOL_OFF
*/
const OFF = UNKNOWN;
/**
* @var int
* @cvalue UCOL_ON
*/
const ON = UNKNOWN;
/**
* @var int
* @cvalue UCOL_SHIFTED
*/
const SHIFTED = UNKNOWN;
/**
* @var int
* @cvalue UCOL_NON_IGNORABLE
*/
const NON_IGNORABLE = UNKNOWN;
/**
* @var int
* @cvalue UCOL_LOWER_FIRST
*/
const LOWER_FIRST = UNKNOWN;
/**
* @var int
* @cvalue UCOL_UPPER_FIRST
*/
const UPPER_FIRST = UNKNOWN;
/* UColAttribute constants */
/**
* @var int
* @cvalue UCOL_FRENCH_COLLATION
*/
const FRENCH_COLLATION = UNKNOWN;
/**
* @var int
* @cvalue UCOL_ALTERNATE_HANDLING
*/
const ALTERNATE_HANDLING = UNKNOWN;
/**
* @var int
* @cvalue UCOL_CASE_FIRST
*/
const CASE_FIRST = UNKNOWN;
/**
* @var int
* @cvalue UCOL_CASE_LEVEL
*/
const CASE_LEVEL = UNKNOWN;
/**
* @var int
* @cvalue UCOL_NORMALIZATION_MODE
*/
const NORMALIZATION_MODE = UNKNOWN;
/**
* @var int
* @cvalue UCOL_STRENGTH
*/
const STRENGTH = UNKNOWN;
/**
* @var int
* @cvalue UCOL_HIRAGANA_QUATERNARY_MODE
*/
const HIRAGANA_QUATERNARY_MODE = UNKNOWN;
/**
* @var int
* @cvalue UCOL_NUMERIC_COLLATION
*/
const NUMERIC_COLLATION = UNKNOWN;
/* sort flags */
/**
* @var int
* @cvalue COLLATOR_SORT_REGULAR
*/
const SORT_REGULAR = UNKNOWN;
/**
* @var int
* @cvalue COLLATOR_SORT_STRING
*/
const SORT_STRING = UNKNOWN;
/**
* @var int
* @cvalue COLLATOR_SORT_NUMERIC
*/
const SORT_NUMERIC = UNKNOWN;
public function __construct(string $locale) {}
/**
* @tentative-return-type
* @alias collator_create
*/
public static function create(string $locale): ?Collator {}
/**
* @tentative-return-type
* @alias collator_compare
*/
public function compare(string $string1, string $string2): int|false {}
/**
* @tentative-return-type
* @alias collator_sort
*/
public function sort(array &$array, int $flags = Collator::SORT_REGULAR): bool {}
/**
* @tentative-return-type
* @alias collator_sort_with_sort_keys
*/
public function sortWithSortKeys(array &$array): bool {}
/**
* @tentative-return-type
* @alias collator_asort
*/
public function asort(array &$array, int $flags = Collator::SORT_REGULAR): bool {}
/**
* @tentative-return-type
* @alias collator_get_attribute
*/
public function getAttribute(int $attribute): int|false {}
/**
* @tentative-return-type
* @alias collator_set_attribute
*/
public function setAttribute(int $attribute, int $value): bool {}
/**
* @tentative-return-type
* @alias collator_get_strength
*/
public function getStrength(): int {}
/**
* @return bool
* @alias collator_set_strength
*/
public function setStrength(int $strength) {} // TODO make return type void
/**
* @tentative-return-type
* @alias collator_get_locale
*/
public function getLocale(int $type): string|false {}
/**
* @tentative-return-type
* @alias collator_get_error_code
*/
public function getErrorCode(): int|false {}
/**
* @tentative-return-type
* @alias collator_get_error_message
*/
public function getErrorMessage(): string|false {}
/**
* @tentative-return-type
* @alias collator_get_sort_key
*/
public function getSortKey(string $string): string|false {}
}