-
Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathlocale.stub.php
163 lines (143 loc) · 4.08 KB
/
locale.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
<?php
/** @generate-class-entries */
class Locale
{
/**
* @var int
* @cvalue ULOC_ACTUAL_LOCALE
*/
public const ACTUAL_LOCALE = UNKNOWN;
/**
* @var int
* @cvalue ULOC_VALID_LOCALE
*/
public const VALID_LOCALE = UNKNOWN;
/** @var null */
public const DEFAULT_LOCALE = null;
/**
* @var string
* @cvalue LOC_LANG_TAG
*/
public const LANG_TAG = UNKNOWN;
/**
* @var string
* @cvalue LOC_EXTLANG_TAG
*/
public const EXTLANG_TAG = UNKNOWN;
/**
* @var string
* @cvalue LOC_SCRIPT_TAG
*/
public const SCRIPT_TAG = UNKNOWN;
/**
* @var string
* @cvalue LOC_REGION_TAG
*/
public const REGION_TAG = UNKNOWN;
/**
* @var string
* @cvalue LOC_VARIANT_TAG
*/
public const VARIANT_TAG = UNKNOWN;
/**
* @var string
* @cvalue LOC_GRANDFATHERED_LANG_TAG
*/
public const GRANDFATHERED_LANG_TAG = UNKNOWN;
/**
* @var string
* @cvalue LOC_PRIVATE_TAG
*/
public const PRIVATE_TAG = UNKNOWN;
/**
* @tentative-return-type
* @alias locale_get_default
*/
public static function getDefault(): string {}
/**
* @return bool
* @alias locale_set_default
*/
public static function setDefault(string $locale) {} // TODO make return type void
/**
* @tentative-return-type
* @alias locale_get_primary_language
*/
public static function getPrimaryLanguage(string $locale): ?string{}
/**
* @tentative-return-type
* @alias locale_get_script
*/
public static function getScript(string $locale): ?string {}
/**
* @tentative-return-type
* @alias locale_get_region
*/
public static function getRegion(string $locale): ?string {}
/**
* @return array<string, string>|false|null
* @tentative-return-type
* @alias locale_get_keywords
*/
public static function getKeywords(string $locale): array|false|null {}
/**
* @tentative-return-type
* @alias locale_get_display_script
*/
public static function getDisplayScript(string $locale, ?string $displayLocale = null): string|false {}
/**
* @tentative-return-type
* @alias locale_get_display_region
*/
public static function getDisplayRegion(string $locale, ?string $displayLocale = null): string|false {}
/**
* @tentative-return-type
* @alias locale_get_display_name
*/
public static function getDisplayName(string $locale, ?string $displayLocale = null): string|false {}
/**
* @tentative-return-type
* @alias locale_get_display_language
*/
public static function getDisplayLanguage(string $locale, ?string $displayLocale = null): string|false {}
/**
* @tentative-return-type
* @alias locale_get_display_variant
*/
public static function getDisplayVariant(string $locale, ?string $displayLocale = null): string|false {}
/**
* @tentative-return-type
* @alias locale_compose
*/
public static function composeLocale(array $subtags): string|false {}
/**
* @tentative-return-type
* @alias locale_parse
*/
public static function parseLocale(string $locale): ?array {}
/**
* @tentative-return-type
* @alias locale_get_all_variants
*/
public static function getAllVariants(string $locale): ?array {}
/**
* @tentative-return-type
* @alias locale_filter_matches
*/
public static function filterMatches(string $languageTag, string $locale, bool $canonicalize = false): ?bool {}
/**
* @tentative-return-type
* @alias locale_lookup
*/
public static function lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null): ?string {}
/**
* @tentative-return-type
* @alias locale_canonicalize
*/
public static function canonicalize(string $locale): ?string {}
/**
* @tentative-return-type
* @alias locale_accept_from_http
*/
public static function acceptFromHttp(string $header): string|false {}
}