| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace Faker\Provider\en_HK;
|
|
|
4 |
|
|
|
5 |
class Address extends \Faker\Provider\Address
|
|
|
6 |
{
|
|
|
7 |
protected static $country = ['Hong Kong'];
|
|
|
8 |
|
|
|
9 |
protected static $syllables = [
|
|
|
10 |
'A', 'Ai', 'Ak', 'Am', 'An', 'Ang', 'Ap', 'At', 'Au',
|
|
|
11 |
'Cha', 'Chai', 'Chak', 'Cham', 'Chan', 'Chang', 'Chap', 'Chat', 'Chau',
|
|
|
12 |
'Che', 'Chek', 'Cheng', 'Cheuk', 'Cheung',
|
|
|
13 |
'Chi', 'Chik', 'Chim', 'Chin', 'Ching', 'Chip', 'Chit', 'Chiu',
|
|
|
14 |
'Cho', 'Choi', 'Chok', 'Chong', 'Chou',
|
|
|
15 |
'Chue', 'Chuen', 'Chuet', 'Chui', 'Chuk', 'Chun', 'Chung', 'Chut',
|
|
|
16 |
'E', 'Ei',
|
|
|
17 |
'Fa', 'Fai', 'Fak', 'Fan', 'Fang', 'Fat', 'Fau',
|
|
|
18 |
'Fe', 'Fei', 'Fo', 'Fok', 'Fong',
|
|
|
19 |
'Fu', 'Fui', 'Fuk', 'Fun', 'Fung', 'Fut',
|
|
|
20 |
'Ha', 'Hai', 'Hak', 'Ham', 'Han', 'Hang', 'Hap', 'Hat', 'Hau',
|
|
|
21 |
'Hei', 'Hek', 'Heng', 'Heu', 'Heung',
|
|
|
22 |
'Hik', 'Him', 'Hin', 'Hing', 'Hip', 'Hit', 'Hiu',
|
|
|
23 |
'Ho', 'Hoi', 'Hok', 'Hon', 'Hong', 'Hot', 'Hou',
|
|
|
24 |
'Huen', 'Huet', 'Hui', 'Huk', 'Hung',
|
|
|
25 |
'Ka', 'Kai', 'Kak', 'Kam', 'Kan', 'Kang', 'Kap', 'Kat', 'Kau',
|
|
|
26 |
'Ke', 'Kei', 'Kek', 'Keng', 'Keu', 'Keuk', 'Keung',
|
|
|
27 |
'Kik', 'Kim', 'Kin', 'King', 'Kip', 'Kit', 'Kiu',
|
|
|
28 |
'Ko', 'Koi', 'Kok', 'Kon', 'Kong', 'Kot', 'Kou',
|
|
|
29 |
'Ku', 'Kuen', 'Kuet', 'Kui', 'Kuk', 'Kun', 'Kung', 'Kut',
|
|
|
30 |
'Kwa', 'Kwai', 'Kwak', 'Kwan', 'Kwang', 'Kwat', 'Kwik', 'Kwing', 'Kwo', 'Kwok', 'Kwong',
|
|
|
31 |
'La', 'Lai', 'Lak', 'Lam', 'Lan', 'Lang', 'Lap', 'Lat', 'Lau',
|
|
|
32 |
'Le', 'Lei', 'Lek', 'Leng', 'Leuk', 'Leung',
|
|
|
33 |
'Li', 'Lik', 'Lim', 'Lin', 'Ling', 'Lip', 'Lit', 'Liu',
|
|
|
34 |
'Lo', 'Loi', 'Lok', 'Long', 'Lou',
|
|
|
35 |
'Luen', 'Luet', 'Lui', 'Luk', 'Lun', 'Lung', 'Lut',
|
|
|
36 |
'Ma', 'Mai', 'Mak', 'Man', 'Mang', 'Mat', 'Mau',
|
|
|
37 |
'Me', 'Mei', 'Meng',
|
|
|
38 |
'Mi', 'Mik', 'Min', 'Ming', 'Mit', 'Miu',
|
|
|
39 |
'Mo', 'Mok', 'Mong', 'Mou',
|
|
|
40 |
'Mui', 'Muk', 'Mun', 'Mung', 'Mut',
|
|
|
41 |
'Na', 'Nai', 'Nam', 'Nan', 'Nang', 'Nap', 'Nat', 'Nau',
|
|
|
42 |
'Ne', 'Nei', 'Neung',
|
|
|
43 |
'Ng', 'Nga', 'Ngai', 'Ngak', 'Ngam', 'Ngan', 'Ngang', 'Ngap', 'Ngat', 'Ngau',
|
|
|
44 |
'Ngit',
|
|
|
45 |
'Ngo', 'Ngoi', 'Ngok', 'Ngon', 'Ngong', 'Ngou',
|
|
|
46 |
'Ni', 'Nik', 'Nim', 'Nin', 'Ning', 'Nip', 'Niu',
|
|
|
47 |
'No', 'Noi', 'Nok', 'Nong', 'Nou', 'Nuen',
|
|
|
48 |
'Nui', 'Nuk', 'Nung', 'Nut',
|
|
|
49 |
'O', 'Oi', 'Ok', 'On', 'Ong', 'Ou',
|
|
|
50 |
'Pa', 'Pai', 'Pak', 'Pam', 'Pan', 'Pang', 'Pat', 'Pau',
|
|
|
51 |
'Pe', 'Pei', 'Pek', 'Peng',
|
|
|
52 |
'Pik', 'Pin', 'Ping', 'Pit', 'Piu',
|
|
|
53 |
'Po', 'Poi', 'Pok', 'Pong', 'Pou',
|
|
|
54 |
'Pui', 'Puk', 'Pun', 'Pung', 'Put',
|
|
|
55 |
'Sa', 'Sai', 'Sak', 'Sam', 'San', 'Sang', 'Sap', 'Sat', 'Sau',
|
|
|
56 |
'Se', 'Sei', 'Sek', 'Seng', 'Seuk', 'Seung',
|
|
|
57 |
'Sha', 'Shai', 'Shak', 'Sham', 'Shan', 'Shang', 'Shap', 'Shat', 'Shau',
|
|
|
58 |
'She', 'Shei', 'Shek', 'Sheng', 'Sheuk', 'Sheung',
|
|
|
59 |
'Shi', 'Shik', 'Shim', 'Shin', 'Shing', 'Ship', 'Shit', 'Shiu',
|
|
|
60 |
'Sho', 'Shoi', 'Shok', 'Shong', 'Shou',
|
|
|
61 |
'Shue', 'Shuen', 'Shuet', 'Shui', 'Shuk', 'Shun', 'Shung', 'Shut',
|
|
|
62 |
'Sik', 'Sim', 'Sin', 'Sing', 'Sip', 'Sit', 'Siu',
|
|
|
63 |
'So', 'Soi', 'Sok', 'Song', 'Sou',
|
|
|
64 |
'Sue', 'Suen', 'Suet', 'Sui', 'Suk', 'Sun', 'Sung', 'Sut',
|
|
|
65 |
'Sze',
|
|
|
66 |
'Ta', 'Tai', 'Tak', 'Tam', 'Tan', 'Tang', 'Tap', 'Tat', 'Tau',
|
|
|
67 |
'Te', 'Tei', 'Tek', 'Teng', 'Teu', 'Teuk',
|
|
|
68 |
'Tik', 'Tim', 'Tin', 'Ting', 'Tip', 'Tit', 'Tiu',
|
|
|
69 |
'To', 'Toi', 'Tok', 'Tong', 'Tou',
|
|
|
70 |
'Tsa', 'Tsai', 'Tsak', 'Tsam', 'Tsan', 'Tsang', 'Tsap', 'Tsat', 'Tsau',
|
|
|
71 |
'Tse', 'Tsek', 'Tseng', 'Tseuk', 'Tseung',
|
|
|
72 |
'Tsik', 'Tsim', 'Tsin', 'Tsing', 'Tsip', 'Tsit', 'Tsiu',
|
|
|
73 |
'Tso', 'Tsoi', 'Tsok', 'Tsong', 'Tsou',
|
|
|
74 |
'Tsue', 'Tsuen', 'Tsuet', 'Tsui', 'Tsuk', 'Tsun', 'Tsung', 'Tsut',
|
|
|
75 |
'Tsz',
|
|
|
76 |
'Tuen', 'Tuet', 'Tui', 'Tuk', 'Tun', 'Tung', 'Tut',
|
|
|
77 |
'Uk', 'Ung',
|
|
|
78 |
'Wa', 'Wai', 'Wak', 'Wan', 'Wang', 'Wat',
|
|
|
79 |
'Wik', 'Wing',
|
|
|
80 |
'Wo', 'Wok', 'Wong', 'Wu',
|
|
|
81 |
'Wui', 'Wun', 'Wut', 'Ya',
|
|
|
82 |
'Yai', 'Yak', 'Yam', 'Yan', 'Yap', 'Yat', 'Yau',
|
|
|
83 |
'Ye', 'Yeng', 'Yeuk', 'Yeung', 'Yi',
|
|
|
84 |
'Yik', 'Yim', 'Yin', 'Ying', 'Yip', 'Yit', 'Yiu',
|
|
|
85 |
'Yo',
|
|
|
86 |
'Yue', 'Yuen', 'Yuet', 'Yui', 'Yuk', 'Yun', 'Yung',
|
|
|
87 |
];
|
|
|
88 |
|
|
|
89 |
protected static $streetAddressFormats = [
|
|
|
90 |
'{{buildingNumber}} {{streetName}}',
|
|
|
91 |
'{{buildingNumber}} {{village}}',
|
|
|
92 |
'Block {{buildingNumber}}, {{estate}}',
|
|
|
93 |
];
|
|
|
94 |
|
|
|
95 |
protected static $addressFormats = [
|
|
|
96 |
"{{streetAddress}}\n{{town}}\n{{city}}",
|
|
|
97 |
];
|
|
|
98 |
|
|
|
99 |
protected static $villageNameFormats = [
|
|
|
100 |
'{{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
101 |
'{{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
102 |
'{{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
103 |
'{{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
104 |
'{{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
105 |
'{{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
106 |
'{{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
107 |
'{{syllable}} {{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
108 |
'{{syllable}} {{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
109 |
'{{syllable}} {{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
110 |
'{{syllable}} {{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
111 |
'{{syllable}} {{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
112 |
'{{syllable}} {{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
113 |
'{{syllable}} {{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
114 |
'{{syllable}} {{syllable}} {{syllable}} {{villageSuffix}}',
|
|
|
115 |
'{{syllable}} {{syllable}}',
|
|
|
116 |
'{{syllable}} {{syllable}}',
|
|
|
117 |
'{{syllable}} {{syllable}}',
|
|
|
118 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
119 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
120 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
121 |
'{{town}}',
|
|
|
122 |
'{{town}} {{villageSuffix}}',
|
|
|
123 |
];
|
|
|
124 |
|
|
|
125 |
protected static $estateNameFormats = [
|
|
|
126 |
'{{syllable}} {{syllable}} {{estateSuffix}}',
|
|
|
127 |
'{{syllable}} {{syllable}} {{estateSuffix}}',
|
|
|
128 |
'{{syllable}} {{syllable}} {{estateSuffix}}',
|
|
|
129 |
'{{syllable}} {{syllable}} {{syllable}} {{estateSuffix}}',
|
|
|
130 |
'{{syllable}} {{syllable}} {{syllable}} {{estateSuffix}}',
|
|
|
131 |
'{{syllable}} {{syllable}} {{syllable}} {{estateSuffix}}',
|
|
|
132 |
'{{town}} {{estateSuffix}}',
|
|
|
133 |
];
|
|
|
134 |
|
|
|
135 |
protected static $villageSuffixes = ['Village', 'Tsuen', 'San Tsuen', 'New Village', 'Wai'];
|
|
|
136 |
|
|
|
137 |
protected static $estateSuffixes = ['Estate', 'Court'];
|
|
|
138 |
|
|
|
139 |
protected static $streetNameFormats = [
|
|
|
140 |
'{{syllable}} {{streetSuffix}}',
|
|
|
141 |
'{{syllable}} {{syllable}} {{streetSuffix}}',
|
|
|
142 |
'{{syllable}} {{syllable}} {{streetSuffix}}',
|
|
|
143 |
'{{syllable}} {{syllable}} {{streetSuffix}}',
|
|
|
144 |
'{{syllable}} {{syllable}} {{syllable}} {{streetSuffix}}',
|
|
|
145 |
'{{syllable}} {{syllable}} {{syllable}} {{streetSuffix}}',
|
|
|
146 |
'{{syllable}} {{syllable}} {{syllable}} {{streetSuffix}}',
|
|
|
147 |
'{{syllable}} {{syllable}} {{direction}} {{streetSuffix}}',
|
|
|
148 |
'{{syllable}} {{syllable}} {{syllable}} {{direction}} {{streetSuffix}}',
|
|
|
149 |
'{{syllable}} {{syllable}} {{streetSuffix}} {{direction}}',
|
|
|
150 |
'{{syllable}} {{syllable}} {{syllable}} {{streetSuffix}} {{direction}}',
|
|
|
151 |
'{{englishStreetName}} {{streetSuffix}}',
|
|
|
152 |
'{{englishStreetName}} {{streetSuffix}} {{direction}}',
|
|
|
153 |
];
|
|
|
154 |
|
|
|
155 |
protected static $englishStreetNames = [
|
|
|
156 |
"King's", "Queen's", 'Nathan', 'Robinson', 'Kingston', 'Irving', 'Bonham', 'Salisbury',
|
|
|
157 |
'Tonkin', 'Nanking', 'Peking', 'Canton', 'Amoy', 'Shanghai',
|
|
|
158 |
];
|
|
|
159 |
|
|
|
160 |
protected static $streetSuffix = [
|
|
|
161 |
'Road', 'Road', 'Road', 'Street', 'Street', 'Street', 'Lane',
|
|
|
162 |
'Circuit', 'Avenue', 'Path', 'Square',
|
|
|
163 |
];
|
|
|
164 |
|
|
|
165 |
protected static $directions = ['North', 'East', 'South', 'West'];
|
|
|
166 |
|
|
|
167 |
protected static $cities = ['Hong Kong', 'Kowloon', 'New Territories'];
|
|
|
168 |
|
|
|
169 |
protected static $towns = [
|
|
|
170 |
'{{syllable}} {{syllable}}',
|
|
|
171 |
'{{syllable}} {{syllable}}',
|
|
|
172 |
'{{syllable}} {{syllable}}',
|
|
|
173 |
'{{syllable}} {{syllable}}',
|
|
|
174 |
'{{syllable}} {{syllable}}',
|
|
|
175 |
'{{syllable}} {{syllable}}',
|
|
|
176 |
'{{syllable}} {{syllable}}',
|
|
|
177 |
'{{syllable}} {{syllable}}',
|
|
|
178 |
'{{syllable}} {{syllable}}',
|
|
|
179 |
'{{syllable}} {{syllable}}',
|
|
|
180 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
181 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
182 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
183 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
184 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
185 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
186 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
187 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
188 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
189 |
'{{syllable}} {{syllable}} {{syllable}}',
|
|
|
190 |
'Aberdeen',
|
|
|
191 |
'Stanley',
|
|
|
192 |
'Victoria',
|
|
|
193 |
];
|
|
|
194 |
|
|
|
195 |
public function city()
|
|
|
196 |
{
|
|
|
197 |
return static::randomElement(static::$cities);
|
|
|
198 |
}
|
|
|
199 |
|
|
|
200 |
public function town()
|
|
|
201 |
{
|
|
|
202 |
return $this->generator->parse(static::randomElement(static::$towns));
|
|
|
203 |
}
|
|
|
204 |
|
|
|
205 |
public function syllable()
|
|
|
206 |
{
|
|
|
207 |
return static::randomElement(static::$syllables);
|
|
|
208 |
}
|
|
|
209 |
|
|
|
210 |
public function direction()
|
|
|
211 |
{
|
|
|
212 |
return static::randomElement(static::$directions);
|
|
|
213 |
}
|
|
|
214 |
|
|
|
215 |
public function englishStreetName()
|
|
|
216 |
{
|
|
|
217 |
return static::randomElement(static::$englishStreetNames);
|
|
|
218 |
}
|
|
|
219 |
|
|
|
220 |
public function villageSuffix()
|
|
|
221 |
{
|
|
|
222 |
return static::randomElement(static::$villageSuffixes);
|
|
|
223 |
}
|
|
|
224 |
|
|
|
225 |
public function estateSuffix()
|
|
|
226 |
{
|
|
|
227 |
return static::randomElement(static::$estateSuffixes);
|
|
|
228 |
}
|
|
|
229 |
|
|
|
230 |
public function village()
|
|
|
231 |
{
|
|
|
232 |
return $this->generator->parse(static::randomElement(static::$villageNameFormats));
|
|
|
233 |
}
|
|
|
234 |
|
|
|
235 |
public function estate()
|
|
|
236 |
{
|
|
|
237 |
return $this->generator->parse(static::randomElement(static::$estateNameFormats));
|
|
|
238 |
}
|
|
|
239 |
}
|