xref: /PHP-8.4/ext/intl/collator/collator.stub.php (revision b06c95b6)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @var int
7 * @cvalue ULOC_ACTUAL_LOCALE
8 */
9const ULOC_ACTUAL_LOCALE = UNKNOWN;
10/**
11 * @var int
12 * @cvalue ULOC_VALID_LOCALE
13 */
14const ULOC_VALID_LOCALE = UNKNOWN;
15
16/** @not-serializable */
17class Collator
18{
19    /** @cvalue UCOL_DEFAULT */
20    public const int DEFAULT_VALUE = UNKNOWN;
21
22    /** @cvalue UCOL_PRIMARY */
23    public const int PRIMARY = UNKNOWN;
24    /** @cvalue UCOL_SECONDARY */
25    public const int SECONDARY = UNKNOWN;
26    /** @cvalue UCOL_TERTIARY */
27    public const int TERTIARY = UNKNOWN;
28    /** @cvalue UCOL_DEFAULT_STRENGTH */
29    public const int DEFAULT_STRENGTH = UNKNOWN;
30    /** @cvalue UCOL_QUATERNARY */
31    public const int QUATERNARY = UNKNOWN;
32    /** @cvalue UCOL_IDENTICAL */
33    public const int IDENTICAL = UNKNOWN;
34
35    /** @cvalue UCOL_OFF */
36    public const int OFF = UNKNOWN;
37    /** @cvalue UCOL_ON */
38    public const int ON = UNKNOWN;
39
40    /** @cvalue UCOL_SHIFTED */
41    public const int SHIFTED = UNKNOWN;
42    /** @cvalue UCOL_NON_IGNORABLE */
43    public const int NON_IGNORABLE = UNKNOWN;
44
45    /** @cvalue UCOL_LOWER_FIRST */
46    public const int LOWER_FIRST = UNKNOWN;
47    /** @cvalue UCOL_UPPER_FIRST */
48    public const int UPPER_FIRST = UNKNOWN;
49
50    /* UColAttribute constants */
51
52    /** @cvalue UCOL_FRENCH_COLLATION */
53    public const int FRENCH_COLLATION = UNKNOWN;
54    /** @cvalue UCOL_ALTERNATE_HANDLING */
55    public const int ALTERNATE_HANDLING = UNKNOWN;
56    /** @cvalue UCOL_CASE_FIRST */
57    public const int CASE_FIRST = UNKNOWN;
58    /** @cvalue UCOL_CASE_LEVEL */
59    public const int CASE_LEVEL = UNKNOWN;
60    /** @cvalue UCOL_NORMALIZATION_MODE */
61    public const int NORMALIZATION_MODE = UNKNOWN;
62    /** @cvalue UCOL_STRENGTH */
63    public const int STRENGTH = UNKNOWN;
64    /** @cvalue UCOL_HIRAGANA_QUATERNARY_MODE */
65    public const int HIRAGANA_QUATERNARY_MODE = UNKNOWN;
66    /** @cvalue UCOL_NUMERIC_COLLATION */
67    public const int NUMERIC_COLLATION = UNKNOWN;
68
69    /* sort flags */
70
71    /** @cvalue COLLATOR_SORT_REGULAR */
72    public const int SORT_REGULAR = UNKNOWN;
73    /** @cvalue COLLATOR_SORT_STRING */
74    public const int SORT_STRING = UNKNOWN;
75    /** @cvalue COLLATOR_SORT_NUMERIC */
76    public const int SORT_NUMERIC = UNKNOWN;
77
78    public function __construct(string $locale) {}
79
80    /**
81     * @tentative-return-type
82     * @alias collator_create
83     */
84    public static function create(string $locale): ?Collator {}
85
86    /**
87     * @tentative-return-type
88     * @alias collator_compare
89     */
90    public function compare(string $string1, string $string2): int|false {}
91
92    /**
93     * @tentative-return-type
94     * @alias collator_sort
95     */
96    public function sort(array &$array, int $flags = Collator::SORT_REGULAR): bool {}
97
98    /**
99     * @tentative-return-type
100     * @alias collator_sort_with_sort_keys
101     */
102    public function sortWithSortKeys(array &$array): bool {}
103
104    /**
105     * @tentative-return-type
106     * @alias collator_asort
107     */
108    public function asort(array &$array, int $flags = Collator::SORT_REGULAR): bool {}
109
110    /**
111     * @tentative-return-type
112     * @alias collator_get_attribute
113     */
114    public function getAttribute(int $attribute): int|false {}
115
116    /**
117     * @tentative-return-type
118     * @alias collator_set_attribute
119     */
120    public function setAttribute(int $attribute, int $value): bool {}
121
122    /**
123     * @tentative-return-type
124     * @alias collator_get_strength
125     */
126    public function getStrength(): int {}
127
128    /**
129     * @tentative-return-type
130     * @alias collator_set_strength
131     */
132    public function setStrength(int $strength): true {}
133
134    /**
135     * @tentative-return-type
136     * @alias collator_get_locale
137     */
138    public function getLocale(int $type): string|false {}
139
140    /**
141     * @tentative-return-type
142     * @alias collator_get_error_code
143     */
144    public function getErrorCode(): int|false {}
145
146    /**
147     * @tentative-return-type
148     * @alias collator_get_error_message
149     */
150    public function getErrorMessage(): string|false {}
151
152    /**
153     * @tentative-return-type
154     * @alias collator_get_sort_key
155     */
156    public function getSortKey(string $string): string|false {}
157}
158