1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace libphonenumber; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class PhoneMetadata |
7
|
|
|
* @package libphonenumber |
8
|
|
|
* @internal Used internally, and can change at any time |
9
|
|
|
*/ |
10
|
|
|
class PhoneMetadata |
11
|
|
|
{ |
12
|
|
|
/** |
13
|
|
|
* @var string |
14
|
|
|
*/ |
15
|
|
|
protected $id = null; |
16
|
|
|
/** |
17
|
|
|
* @var int |
18
|
|
|
*/ |
19
|
|
|
protected $countryCode = null; |
20
|
|
|
protected $leadingDigits = null; |
21
|
|
|
protected $internationalPrefix = null; |
22
|
|
|
protected $preferredInternationalPrefix = null; |
23
|
|
|
protected $nationalPrefixForParsing = null; |
24
|
|
|
protected $nationalPrefixTransformRule = null; |
25
|
|
|
protected $nationalPrefix = null; |
26
|
|
|
protected $preferredExtnPrefix = null; |
27
|
|
|
protected $mainCountryForCode = false; |
28
|
|
|
protected $leadingZeroPossible = false; |
29
|
|
|
protected $mobileNumberPortableRegion = false; |
30
|
|
|
protected $generalDesc = null; |
31
|
|
|
/** |
32
|
|
|
* @var PhoneNumberDesc |
33
|
|
|
*/ |
34
|
|
|
protected $mobile = null; |
35
|
|
|
protected $premiumRate = null; |
36
|
|
|
protected $fixedLine = null; |
37
|
|
|
protected $sameMobileAndFixedLinePattern = false; |
38
|
|
|
protected $numberFormat = array(); |
39
|
|
|
protected $tollFree = null; |
40
|
|
|
protected $sharedCost = null; |
41
|
|
|
protected $personalNumber; |
42
|
|
|
protected $voip; |
43
|
|
|
protected $pager; |
44
|
|
|
protected $uan; |
45
|
|
|
protected $emergency; |
46
|
|
|
protected $voicemail; |
47
|
|
|
/** |
48
|
|
|
* @var PhoneNumberDesc |
49
|
|
|
*/ |
50
|
|
|
protected $short_code; |
51
|
|
|
/** |
52
|
|
|
* @var PhoneNumberDesc |
53
|
|
|
*/ |
54
|
|
|
protected $standard_rate; |
55
|
|
|
/** |
56
|
|
|
* @var PhoneNumberDesc |
57
|
|
|
*/ |
58
|
|
|
protected $carrierSpecific; |
59
|
|
|
/** |
60
|
|
|
* @var PhoneNumberDesc |
61
|
|
|
*/ |
62
|
|
|
protected $noInternationalDialling = null; |
63
|
|
|
/** |
64
|
|
|
* |
65
|
|
|
* @var NumberFormat[] |
66
|
|
|
*/ |
67
|
|
|
protected $intlNumberFormat = array(); |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @return boolean |
71
|
|
|
*/ |
72
|
|
|
public function hasId() |
73
|
|
|
{ |
74
|
|
|
return isset($this->id); |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return boolean |
79
|
|
|
*/ |
80
|
482 |
|
public function hasCountryCode() |
81
|
|
|
{ |
82
|
482 |
|
return isset($this->countryCode); |
83
|
|
|
} |
84
|
|
|
|
85
|
482 |
|
public function hasInternationalPrefix() |
86
|
|
|
{ |
87
|
482 |
|
return isset($this->internationalPrefix); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
public function hasMainCountryForCode() |
91
|
|
|
{ |
92
|
|
|
return isset($this->mainCountryForCode); |
93
|
|
|
} |
94
|
|
|
|
95
|
2 |
|
public function isMainCountryForCode() |
96
|
|
|
{ |
97
|
2 |
|
return $this->mainCountryForCode; |
98
|
|
|
} |
99
|
|
|
|
100
|
482 |
|
public function getMainCountryForCode() |
101
|
|
|
{ |
102
|
482 |
|
return $this->mainCountryForCode; |
103
|
|
|
} |
104
|
|
|
|
105
|
1569 |
|
public function setMainCountryForCode($value) |
106
|
|
|
{ |
107
|
1569 |
|
$this->mainCountryForCode = $value; |
108
|
1569 |
|
return $this; |
109
|
|
|
} |
110
|
|
|
|
111
|
1 |
|
public function clearMainCountryForCode() |
112
|
|
|
{ |
113
|
1 |
|
$this->mainCountryForCode = false; |
114
|
1 |
|
return $this; |
115
|
|
|
} |
116
|
|
|
|
117
|
482 |
|
public function hasLeadingZeroPossible() |
118
|
|
|
{ |
119
|
482 |
|
return isset($this->leadingZeroPossible); |
120
|
|
|
} |
121
|
|
|
|
122
|
482 |
|
public function hasMobileNumberPortableRegion() |
123
|
|
|
{ |
124
|
482 |
|
return isset($this->mobileNumberPortableRegion); |
125
|
|
|
} |
126
|
|
|
|
127
|
483 |
|
public function hasSameMobileAndFixedLinePattern() |
128
|
|
|
{ |
129
|
483 |
|
return isset($this->sameMobileAndFixedLinePattern); |
130
|
|
|
} |
131
|
|
|
|
132
|
2 |
|
public function numberFormatSize() |
133
|
|
|
{ |
134
|
2 |
|
return count($this->numberFormat); |
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* @param int $index |
139
|
|
|
* @return NumberFormat |
140
|
|
|
*/ |
141
|
11 |
|
public function getNumberFormat($index) |
142
|
|
|
{ |
143
|
11 |
|
return $this->numberFormat[$index]; |
144
|
|
|
} |
145
|
|
|
|
146
|
27 |
|
public function intlNumberFormatSize() |
147
|
|
|
{ |
148
|
27 |
|
return count($this->intlNumberFormat); |
149
|
|
|
} |
150
|
|
|
|
151
|
6 |
|
public function getIntlNumberFormat($index) |
152
|
|
|
{ |
153
|
6 |
|
return $this->intlNumberFormat[$index]; |
154
|
|
|
} |
155
|
|
|
|
156
|
7 |
|
public function clearIntlNumberFormat() |
157
|
|
|
{ |
158
|
7 |
|
$this->intlNumberFormat = array(); |
159
|
7 |
|
return $this; |
160
|
|
|
} |
161
|
|
|
|
162
|
482 |
|
public function toArray() |
163
|
|
|
{ |
164
|
482 |
|
$output = array(); |
165
|
|
|
|
166
|
482 |
|
if ($this->hasGeneralDesc()) { |
167
|
482 |
|
$output['generalDesc'] = $this->getGeneralDesc()->toArray(); |
168
|
|
|
} |
169
|
|
|
|
170
|
482 |
|
if ($this->hasFixedLine()) { |
171
|
244 |
|
$output['fixedLine'] = $this->getFixedLine()->toArray(); |
172
|
|
|
} |
173
|
|
|
|
174
|
482 |
|
if ($this->hasMobile()) { |
175
|
244 |
|
$output['mobile'] = $this->getMobile()->toArray(); |
176
|
|
|
} |
177
|
|
|
|
178
|
482 |
|
if ($this->hasTollFree()) { |
179
|
482 |
|
$output['tollFree'] = $this->getTollFree()->toArray(); |
180
|
|
|
} |
181
|
|
|
|
182
|
482 |
|
if ($this->hasPremiumRate()) { |
183
|
482 |
|
$output['premiumRate'] = $this->getPremiumRate()->toArray(); |
184
|
|
|
} |
185
|
|
|
|
186
|
482 |
|
if ($this->hasPremiumRate()) { |
187
|
482 |
|
$output['premiumRate'] = $this->getPremiumRate()->toArray(); |
188
|
|
|
} |
189
|
|
|
|
190
|
482 |
|
if ($this->hasSharedCost()) { |
191
|
244 |
|
$output['sharedCost'] = $this->getSharedCost()->toArray(); |
192
|
|
|
} |
193
|
|
|
|
194
|
482 |
|
if ($this->hasPersonalNumber()) { |
195
|
244 |
|
$output['personalNumber'] = $this->getPersonalNumber()->toArray(); |
196
|
|
|
} |
197
|
|
|
|
198
|
482 |
|
if ($this->hasVoip()) { |
199
|
244 |
|
$output['voip'] = $this->getVoip()->toArray(); |
200
|
|
|
} |
201
|
|
|
|
202
|
482 |
|
if ($this->hasPager()) { |
203
|
244 |
|
$output['pager'] = $this->getPager()->toArray(); |
204
|
|
|
} |
205
|
|
|
|
206
|
482 |
|
if ($this->hasUan()) { |
207
|
244 |
|
$output['uan'] = $this->getUan()->toArray(); |
208
|
|
|
} |
209
|
|
|
|
210
|
482 |
|
if ($this->hasEmergency()) { |
211
|
238 |
|
$output['emergency'] = $this->getEmergency()->toArray(); |
212
|
|
|
} |
213
|
|
|
|
214
|
482 |
|
if ($this->hasVoicemail()) { |
215
|
244 |
|
$output['voicemail'] = $this->getVoicemail()->toArray(); |
216
|
|
|
} |
217
|
|
|
|
218
|
482 |
|
if ($this->hasShortCode()) { |
219
|
238 |
|
$output['shortCode'] = $this->getShortCode()->toArray(); |
220
|
|
|
} |
221
|
|
|
|
222
|
482 |
|
if ($this->hasStandardRate()) { |
223
|
238 |
|
$output['standardRate'] = $this->getStandardRate()->toArray(); |
224
|
|
|
} |
225
|
|
|
|
226
|
482 |
|
if ($this->hasCarrierSpecific()) { |
227
|
238 |
|
$output['carrierSpecific'] = $this->getCarrierSpecific()->toArray(); |
228
|
|
|
} |
229
|
|
|
|
230
|
482 |
|
if ($this->hasNoInternationalDialling()) { |
231
|
244 |
|
$output['noInternationalDialling'] = $this->getNoInternationalDialling()->toArray(); |
232
|
|
|
} |
233
|
|
|
|
234
|
482 |
|
$output['id'] = $this->getId(); |
235
|
482 |
|
if ($this->hasCountryCode()) { |
236
|
482 |
|
$output['countryCode'] = $this->getCountryCode(); |
237
|
|
|
} |
238
|
|
|
|
239
|
482 |
|
if ($this->hasInternationalPrefix()) { |
240
|
482 |
|
$output['internationalPrefix'] = $this->getInternationalPrefix(); |
241
|
|
|
} |
242
|
|
|
|
243
|
482 |
|
if ($this->hasPreferredInternationalPrefix()) { |
244
|
22 |
|
$output['preferredInternationalPrefix'] = $this->getPreferredInternationalPrefix(); |
245
|
|
|
} |
246
|
|
|
|
247
|
482 |
|
if ($this->hasNationalPrefix()) { |
248
|
146 |
|
$output['nationalPrefix'] = $this->getNationalPrefix(); |
249
|
|
|
} |
250
|
|
|
|
251
|
482 |
|
if ($this->hasPreferredExtnPrefix()) { |
252
|
8 |
|
$output['preferredExtnPrefix'] = $this->getPreferredExtnPrefix(); |
253
|
|
|
} |
254
|
|
|
|
255
|
482 |
|
if ($this->hasNationalPrefixForParsing()) { |
256
|
151 |
|
$output['nationalPrefixForParsing'] = $this->getNationalPrefixForParsing(); |
257
|
|
|
} |
258
|
|
|
|
259
|
482 |
|
if ($this->hasNationalPrefixTransformRule()) { |
260
|
4 |
|
$output['nationalPrefixTransformRule'] = $this->getNationalPrefixTransformRule(); |
261
|
|
|
} |
262
|
|
|
|
263
|
482 |
|
if ($this->hasSameMobileAndFixedLinePattern()) { |
264
|
482 |
|
$output['sameMobileAndFixedLinePattern'] = $this->isSameMobileAndFixedLinePattern(); |
265
|
|
|
} |
266
|
|
|
|
267
|
482 |
|
$output['numberFormat'] = array(); |
268
|
482 |
|
foreach ($this->numberFormats() as $numberFormat) { |
269
|
198 |
|
$output['numberFormat'][] = $numberFormat->toArray(); |
270
|
|
|
} |
271
|
|
|
|
272
|
482 |
|
$output['intlNumberFormat'] = array(); |
273
|
482 |
|
foreach ($this->intlNumberFormats() as $intlNumberFormat) { |
274
|
15 |
|
$output['intlNumberFormat'][] = $intlNumberFormat->toArray(); |
275
|
|
|
} |
276
|
|
|
|
277
|
482 |
|
$output['mainCountryForCode'] = $this->getMainCountryForCode(); |
278
|
|
|
|
279
|
482 |
|
if ($this->hasLeadingDigits()) { |
280
|
26 |
|
$output['leadingDigits'] = $this->getLeadingDigits(); |
281
|
|
|
} |
282
|
|
|
|
283
|
482 |
|
if ($this->hasLeadingZeroPossible()) { |
284
|
482 |
|
$output['leadingZeroPossible'] = $this->isLeadingZeroPossible(); |
285
|
|
|
} |
286
|
|
|
|
287
|
482 |
|
if ($this->hasMobileNumberPortableRegion()) { |
288
|
482 |
|
$output['mobileNumberPortableRegion'] = $this->isMobileNumberPortableRegion(); |
289
|
|
|
} |
290
|
|
|
|
291
|
482 |
|
return $output; |
292
|
|
|
} |
293
|
|
|
|
294
|
485 |
|
public function hasGeneralDesc() |
295
|
|
|
{ |
296
|
485 |
|
return isset($this->generalDesc); |
297
|
|
|
} |
298
|
|
|
|
299
|
|
|
/** |
300
|
|
|
* @return PhoneNumberDesc |
301
|
|
|
*/ |
302
|
3506 |
|
public function getGeneralDesc() |
303
|
|
|
{ |
304
|
3506 |
|
return $this->generalDesc; |
305
|
|
|
} |
306
|
|
|
|
307
|
1577 |
|
public function setGeneralDesc(PhoneNumberDesc $value) |
308
|
|
|
{ |
309
|
1577 |
|
$this->generalDesc = $value; |
310
|
1577 |
|
return $this; |
311
|
|
|
} |
312
|
|
|
|
313
|
485 |
|
public function hasFixedLine() |
314
|
|
|
{ |
315
|
485 |
|
return isset($this->fixedLine); |
316
|
|
|
} |
317
|
|
|
|
318
|
|
|
/** |
319
|
|
|
* @return PhoneNumberDesc |
320
|
|
|
*/ |
321
|
1860 |
|
public function getFixedLine() |
322
|
|
|
{ |
323
|
1860 |
|
return $this->fixedLine; |
324
|
|
|
} |
325
|
|
|
|
326
|
1084 |
|
public function setFixedLine(PhoneNumberDesc $value) |
327
|
|
|
{ |
328
|
1084 |
|
$this->fixedLine = $value; |
329
|
1084 |
|
return $this; |
330
|
|
|
} |
331
|
|
|
|
332
|
485 |
|
public function hasMobile() |
333
|
|
|
{ |
334
|
485 |
|
return isset($this->mobile); |
335
|
|
|
} |
336
|
|
|
|
337
|
|
|
/** |
338
|
|
|
* @return PhoneNumberDesc |
339
|
|
|
*/ |
340
|
1472 |
|
public function getMobile() |
341
|
|
|
{ |
342
|
1472 |
|
return $this->mobile; |
343
|
|
|
} |
344
|
|
|
|
345
|
1084 |
|
public function setMobile(PhoneNumberDesc $value) |
346
|
|
|
{ |
347
|
1084 |
|
$this->mobile = $value; |
348
|
1084 |
|
return $this; |
349
|
|
|
} |
350
|
|
|
|
351
|
485 |
|
public function hasTollFree() |
352
|
|
|
{ |
353
|
485 |
|
return isset($this->tollFree); |
354
|
|
|
} |
355
|
|
|
|
356
|
|
|
/** |
357
|
|
|
* @return PhoneNumberDesc |
358
|
|
|
*/ |
359
|
2730 |
|
public function getTollFree() |
360
|
|
|
{ |
361
|
2730 |
|
return $this->tollFree; |
362
|
|
|
} |
363
|
|
|
|
364
|
1574 |
|
public function setTollFree(PhoneNumberDesc $value) |
365
|
|
|
{ |
366
|
1574 |
|
$this->tollFree = $value; |
367
|
1574 |
|
return $this; |
368
|
|
|
} |
369
|
|
|
|
370
|
485 |
|
public function hasPremiumRate() |
371
|
|
|
{ |
372
|
485 |
|
return isset($this->premiumRate); |
373
|
|
|
} |
374
|
|
|
|
375
|
|
|
/** |
376
|
|
|
* @return PhoneNumberDesc |
377
|
|
|
*/ |
378
|
2977 |
|
public function getPremiumRate() |
379
|
|
|
{ |
380
|
2977 |
|
return $this->premiumRate; |
381
|
|
|
} |
382
|
|
|
|
383
|
1574 |
|
public function setPremiumRate(PhoneNumberDesc $value) |
384
|
|
|
{ |
385
|
1574 |
|
$this->premiumRate = $value; |
386
|
1574 |
|
return $this; |
387
|
|
|
} |
388
|
|
|
|
389
|
485 |
|
public function hasSharedCost() |
390
|
|
|
{ |
391
|
485 |
|
return isset($this->sharedCost); |
392
|
|
|
} |
393
|
|
|
|
394
|
|
|
/** |
395
|
|
|
* @return PhoneNumberDesc |
396
|
|
|
*/ |
397
|
1939 |
|
public function getSharedCost() |
398
|
|
|
{ |
399
|
1939 |
|
return $this->sharedCost; |
400
|
|
|
} |
401
|
|
|
|
402
|
1084 |
|
public function setSharedCost(PhoneNumberDesc $value) |
403
|
|
|
{ |
404
|
1084 |
|
$this->sharedCost = $value; |
405
|
1084 |
|
return $this; |
406
|
|
|
} |
407
|
|
|
|
408
|
485 |
|
public function hasPersonalNumber() |
409
|
|
|
{ |
410
|
485 |
|
return isset($this->personalNumber); |
411
|
|
|
} |
412
|
|
|
|
413
|
|
|
/** |
414
|
|
|
* @return PhoneNumberDesc |
415
|
|
|
*/ |
416
|
1790 |
|
public function getPersonalNumber() |
417
|
|
|
{ |
418
|
1790 |
|
return $this->personalNumber; |
419
|
|
|
} |
420
|
|
|
|
421
|
1084 |
|
public function setPersonalNumber(PhoneNumberDesc $value) |
422
|
|
|
{ |
423
|
1084 |
|
$this->personalNumber = $value; |
424
|
1084 |
|
return $this; |
425
|
|
|
} |
426
|
|
|
|
427
|
485 |
|
public function hasVoip() |
428
|
|
|
{ |
429
|
485 |
|
return isset($this->voip); |
430
|
|
|
} |
431
|
|
|
|
432
|
|
|
/** |
433
|
|
|
* @return PhoneNumberDesc |
434
|
|
|
*/ |
435
|
1856 |
|
public function getVoip() |
436
|
|
|
{ |
437
|
1856 |
|
return $this->voip; |
438
|
|
|
} |
439
|
|
|
|
440
|
1084 |
|
public function setVoip(PhoneNumberDesc $value) |
441
|
|
|
{ |
442
|
1084 |
|
$this->voip = $value; |
443
|
1084 |
|
return $this; |
444
|
|
|
} |
445
|
|
|
|
446
|
485 |
|
public function hasPager() |
447
|
|
|
{ |
448
|
485 |
|
return isset($this->pager); |
449
|
|
|
} |
450
|
|
|
|
451
|
|
|
/** |
452
|
|
|
* @return PhoneNumberDesc |
453
|
|
|
*/ |
454
|
1764 |
|
public function getPager() |
455
|
|
|
{ |
456
|
1764 |
|
return $this->pager; |
457
|
|
|
} |
458
|
|
|
|
459
|
1084 |
|
public function setPager(PhoneNumberDesc $value) |
460
|
|
|
{ |
461
|
1084 |
|
$this->pager = $value; |
462
|
1084 |
|
return $this; |
463
|
|
|
} |
464
|
|
|
|
465
|
485 |
|
public function hasUan() |
466
|
|
|
{ |
467
|
485 |
|
return isset($this->uan); |
468
|
|
|
} |
469
|
|
|
|
470
|
|
|
/** |
471
|
|
|
* @return PhoneNumberDesc |
472
|
|
|
*/ |
473
|
1717 |
|
public function getUan() |
474
|
|
|
{ |
475
|
1717 |
|
return $this->uan; |
476
|
|
|
} |
477
|
|
|
|
478
|
1084 |
|
public function setUan(PhoneNumberDesc $value) |
479
|
|
|
{ |
480
|
1084 |
|
$this->uan = $value; |
481
|
1084 |
|
return $this; |
482
|
|
|
} |
483
|
|
|
|
484
|
745 |
|
public function hasEmergency() |
485
|
|
|
{ |
486
|
745 |
|
return isset($this->emergency); |
487
|
|
|
} |
488
|
|
|
|
489
|
|
|
/** |
490
|
|
|
* @return PhoneNumberDesc |
491
|
|
|
*/ |
492
|
499 |
|
public function getEmergency() |
493
|
|
|
{ |
494
|
499 |
|
return $this->emergency; |
495
|
|
|
} |
496
|
|
|
|
497
|
498 |
|
public function setEmergency(PhoneNumberDesc $value) |
498
|
|
|
{ |
499
|
498 |
|
$this->emergency = $value; |
500
|
498 |
|
return $this; |
501
|
|
|
} |
502
|
|
|
|
503
|
485 |
|
public function hasVoicemail() |
504
|
|
|
{ |
505
|
485 |
|
return isset($this->voicemail); |
506
|
|
|
} |
507
|
|
|
|
508
|
|
|
/** |
509
|
|
|
* @return PhoneNumberDesc |
510
|
|
|
*/ |
511
|
1703 |
|
public function getVoicemail() |
512
|
|
|
{ |
513
|
1703 |
|
return $this->voicemail; |
514
|
|
|
} |
515
|
|
|
|
516
|
1084 |
|
public function setVoicemail(PhoneNumberDesc $value) |
517
|
|
|
{ |
518
|
1084 |
|
$this->voicemail = $value; |
519
|
1084 |
|
return $this; |
520
|
|
|
} |
521
|
|
|
|
522
|
485 |
|
public function hasShortCode() |
523
|
|
|
{ |
524
|
485 |
|
return isset($this->short_code); |
525
|
|
|
} |
526
|
|
|
|
527
|
484 |
|
public function getShortCode() |
528
|
|
|
{ |
529
|
484 |
|
return $this->short_code; |
530
|
|
|
} |
531
|
|
|
|
532
|
498 |
|
public function setShortCode(PhoneNumberDesc $value) |
533
|
|
|
{ |
534
|
498 |
|
$this->short_code = $value; |
535
|
498 |
|
return $this; |
536
|
|
|
} |
537
|
|
|
|
538
|
485 |
|
public function hasStandardRate() |
539
|
|
|
{ |
540
|
485 |
|
return isset($this->standard_rate); |
541
|
|
|
} |
542
|
|
|
|
543
|
768 |
|
public function getStandardRate() |
544
|
|
|
{ |
545
|
768 |
|
return $this->standard_rate; |
546
|
|
|
} |
547
|
|
|
|
548
|
498 |
|
public function setStandardRate(PhoneNumberDesc $value) |
549
|
|
|
{ |
550
|
498 |
|
$this->standard_rate = $value; |
551
|
498 |
|
return $this; |
552
|
|
|
} |
553
|
|
|
|
554
|
485 |
|
public function hasCarrierSpecific() |
555
|
|
|
{ |
556
|
485 |
|
return isset($this->carrierSpecific); |
557
|
|
|
} |
558
|
|
|
|
559
|
478 |
|
public function getCarrierSpecific() |
560
|
|
|
{ |
561
|
478 |
|
return $this->carrierSpecific; |
562
|
|
|
} |
563
|
|
|
|
564
|
498 |
|
public function setCarrierSpecific(PhoneNumberDesc $value) |
565
|
|
|
{ |
566
|
498 |
|
$this->carrierSpecific = $value; |
567
|
498 |
|
return $this; |
568
|
|
|
} |
569
|
|
|
|
570
|
485 |
|
public function hasNoInternationalDialling() |
571
|
|
|
{ |
572
|
485 |
|
return isset($this->noInternationalDialling); |
573
|
|
|
} |
574
|
|
|
|
575
|
493 |
|
public function getNoInternationalDialling() |
576
|
|
|
{ |
577
|
493 |
|
return $this->noInternationalDialling; |
578
|
|
|
} |
579
|
|
|
|
580
|
1084 |
|
public function setNoInternationalDialling(PhoneNumberDesc $value) |
581
|
|
|
{ |
582
|
1084 |
|
$this->noInternationalDialling = $value; |
583
|
1084 |
|
return $this; |
584
|
|
|
} |
585
|
|
|
|
586
|
|
|
/** |
587
|
|
|
* @return string |
588
|
|
|
*/ |
589
|
497 |
|
public function getId() |
590
|
|
|
{ |
591
|
497 |
|
return $this->id; |
592
|
|
|
} |
593
|
|
|
|
594
|
|
|
/** |
595
|
|
|
* @param string $value |
596
|
|
|
* @return PhoneMetadata |
597
|
|
|
*/ |
598
|
1578 |
|
public function setId($value) |
599
|
|
|
{ |
600
|
1578 |
|
$this->id = $value; |
601
|
1578 |
|
return $this; |
602
|
|
|
} |
603
|
|
|
|
604
|
|
|
/** |
605
|
|
|
* @return int |
606
|
|
|
*/ |
607
|
3474 |
|
public function getCountryCode() |
608
|
|
|
{ |
609
|
3474 |
|
return $this->countryCode; |
610
|
|
|
} |
611
|
|
|
|
612
|
|
|
/** |
613
|
|
|
* @param int $value |
614
|
|
|
* @return PhoneMetadata |
615
|
|
|
*/ |
616
|
1578 |
|
public function setCountryCode($value) |
617
|
|
|
{ |
618
|
1578 |
|
$this->countryCode = $value; |
619
|
1578 |
|
return $this; |
620
|
|
|
} |
621
|
|
|
|
622
|
3472 |
|
public function getInternationalPrefix() |
623
|
|
|
{ |
624
|
3472 |
|
return $this->internationalPrefix; |
625
|
|
|
} |
626
|
|
|
|
627
|
1578 |
|
public function setInternationalPrefix($value) |
628
|
|
|
{ |
629
|
1578 |
|
$this->internationalPrefix = $value; |
630
|
1578 |
|
return $this; |
631
|
|
|
} |
632
|
|
|
|
633
|
485 |
|
public function hasPreferredInternationalPrefix() |
634
|
|
|
{ |
635
|
485 |
|
return isset($this->preferredInternationalPrefix); |
636
|
|
|
} |
637
|
|
|
|
638
|
27 |
|
public function getPreferredInternationalPrefix() |
639
|
|
|
{ |
640
|
27 |
|
return $this->preferredInternationalPrefix; |
641
|
|
|
} |
642
|
|
|
|
643
|
91 |
|
public function setPreferredInternationalPrefix($value) |
644
|
|
|
{ |
645
|
91 |
|
$this->preferredInternationalPrefix = $value; |
646
|
91 |
|
return $this; |
647
|
|
|
} |
648
|
|
|
|
649
|
1 |
|
public function clearPreferredInternationalPrefix() |
650
|
|
|
{ |
651
|
1 |
|
$this->preferredInternationalPrefix = ''; |
652
|
1 |
|
return $this; |
653
|
|
|
} |
654
|
|
|
|
655
|
515 |
|
public function hasNationalPrefix() |
656
|
|
|
{ |
657
|
515 |
|
return isset($this->nationalPrefix); |
658
|
|
|
} |
659
|
|
|
|
660
|
179 |
|
public function getNationalPrefix() |
661
|
|
|
{ |
662
|
179 |
|
return $this->nationalPrefix; |
663
|
|
|
} |
664
|
|
|
|
665
|
755 |
|
public function setNationalPrefix($value) |
666
|
|
|
{ |
667
|
755 |
|
$this->nationalPrefix = $value; |
668
|
755 |
|
return $this; |
669
|
|
|
} |
670
|
|
|
|
671
|
|
|
public function clearNationalPrefix() |
672
|
|
|
{ |
673
|
|
|
$this->nationalPrefix = ''; |
674
|
|
|
return $this; |
675
|
|
|
} |
676
|
|
|
|
677
|
485 |
|
public function hasPreferredExtnPrefix() |
678
|
|
|
{ |
679
|
485 |
|
return isset($this->preferredExtnPrefix); |
680
|
|
|
} |
681
|
|
|
|
682
|
11 |
|
public function getPreferredExtnPrefix() |
683
|
|
|
{ |
684
|
11 |
|
return $this->preferredExtnPrefix; |
685
|
|
|
} |
686
|
|
|
|
687
|
201 |
|
public function setPreferredExtnPrefix($value) |
688
|
|
|
{ |
689
|
201 |
|
$this->preferredExtnPrefix = $value; |
690
|
201 |
|
return $this; |
691
|
|
|
} |
692
|
|
|
|
693
|
1 |
|
public function clearPreferredExtnPrefix() |
694
|
|
|
{ |
695
|
1 |
|
$this->preferredExtnPrefix = ''; |
696
|
1 |
|
return $this; |
697
|
|
|
} |
698
|
|
|
|
699
|
511 |
|
public function hasNationalPrefixForParsing() |
700
|
|
|
{ |
701
|
511 |
|
return isset($this->nationalPrefixForParsing); |
702
|
|
|
} |
703
|
|
|
|
704
|
3144 |
|
public function getNationalPrefixForParsing() |
705
|
|
|
{ |
706
|
3144 |
|
return $this->nationalPrefixForParsing; |
707
|
|
|
} |
708
|
|
|
|
709
|
772 |
|
public function setNationalPrefixForParsing($value) |
710
|
|
|
{ |
711
|
772 |
|
$this->nationalPrefixForParsing = $value; |
712
|
772 |
|
return $this; |
713
|
|
|
} |
714
|
|
|
|
715
|
482 |
|
public function hasNationalPrefixTransformRule() |
716
|
|
|
{ |
717
|
482 |
|
return isset($this->nationalPrefixTransformRule); |
718
|
|
|
} |
719
|
|
|
|
720
|
147 |
|
public function getNationalPrefixTransformRule() |
721
|
|
|
{ |
722
|
147 |
|
return $this->nationalPrefixTransformRule; |
723
|
|
|
} |
724
|
|
|
|
725
|
52 |
|
public function setNationalPrefixTransformRule($value) |
726
|
|
|
{ |
727
|
52 |
|
$this->nationalPrefixTransformRule = $value; |
728
|
52 |
|
return $this; |
729
|
|
|
} |
730
|
|
|
|
731
|
1 |
|
public function clearNationalPrefixTransformRule() |
732
|
|
|
{ |
733
|
1 |
|
$this->nationalPrefixTransformRule = ''; |
734
|
1 |
|
return $this; |
735
|
|
|
} |
736
|
|
|
|
737
|
1684 |
|
public function isSameMobileAndFixedLinePattern() |
738
|
|
|
{ |
739
|
1684 |
|
return $this->sameMobileAndFixedLinePattern; |
740
|
|
|
} |
741
|
|
|
|
742
|
5 |
|
public function setSameMobileAndFixedLinePattern($value) |
743
|
|
|
{ |
744
|
5 |
|
$this->sameMobileAndFixedLinePattern = $value; |
745
|
5 |
|
return $this; |
746
|
|
|
} |
747
|
|
|
|
748
|
1 |
|
public function clearSameMobileAndFixedLinePattern() |
749
|
|
|
{ |
750
|
1 |
|
$this->sameMobileAndFixedLinePattern = false; |
751
|
1 |
|
return $this; |
752
|
|
|
} |
753
|
|
|
|
754
|
|
|
/** |
755
|
|
|
* @return NumberFormat[] |
756
|
|
|
*/ |
757
|
632 |
|
public function numberFormats() |
758
|
|
|
{ |
759
|
632 |
|
return $this->numberFormat; |
760
|
|
|
} |
761
|
|
|
|
762
|
589 |
|
public function intlNumberFormats() |
763
|
|
|
{ |
764
|
589 |
|
return $this->intlNumberFormat; |
765
|
|
|
} |
766
|
|
|
|
767
|
|
|
/** |
768
|
|
|
* @return bool |
769
|
|
|
*/ |
770
|
1078 |
|
public function hasLeadingDigits() |
771
|
|
|
{ |
772
|
1078 |
|
return isset($this->leadingDigits); |
773
|
|
|
} |
774
|
|
|
|
775
|
201 |
|
public function getLeadingDigits() |
776
|
|
|
{ |
777
|
201 |
|
return $this->leadingDigits; |
778
|
|
|
} |
779
|
|
|
|
780
|
80 |
|
public function setLeadingDigits($value) |
781
|
|
|
{ |
782
|
80 |
|
$this->leadingDigits = $value; |
783
|
80 |
|
return $this; |
784
|
|
|
} |
785
|
|
|
|
786
|
486 |
|
public function isLeadingZeroPossible() |
787
|
|
|
{ |
788
|
486 |
|
return $this->leadingZeroPossible; |
789
|
|
|
} |
790
|
|
|
|
791
|
1569 |
|
public function setLeadingZeroPossible($value) |
792
|
|
|
{ |
793
|
1569 |
|
$this->leadingZeroPossible = $value; |
794
|
1569 |
|
return $this; |
795
|
|
|
} |
796
|
|
|
|
797
|
1 |
|
public function clearLeadingZeroPossible() |
798
|
|
|
{ |
799
|
1 |
|
$this->leadingZeroPossible = false; |
800
|
1 |
|
return $this; |
801
|
|
|
} |
802
|
|
|
|
803
|
487 |
|
public function isMobileNumberPortableRegion() |
804
|
|
|
{ |
805
|
487 |
|
return $this->mobileNumberPortableRegion; |
806
|
|
|
} |
807
|
|
|
|
808
|
1569 |
|
public function setMobileNumberPortableRegion($value) |
809
|
|
|
{ |
810
|
1569 |
|
$this->mobileNumberPortableRegion = $value; |
811
|
1569 |
|
return $this; |
812
|
|
|
} |
813
|
|
|
|
814
|
1 |
|
public function clearMobileNumberPortableRegion() |
815
|
|
|
{ |
816
|
1 |
|
$this->mobileNumberPortableRegion = false; |
817
|
1 |
|
return $this; |
818
|
|
|
} |
819
|
|
|
|
820
|
|
|
/** |
821
|
|
|
* @param array $input |
822
|
|
|
* @return PhoneMetadata |
823
|
|
|
*/ |
824
|
1568 |
|
public function fromArray(array $input) |
825
|
|
|
{ |
826
|
1568 |
|
if (isset($input['generalDesc'])) { |
827
|
1568 |
|
$desc = new PhoneNumberDesc(); |
828
|
1568 |
|
$this->setGeneralDesc($desc->fromArray($input['generalDesc'])); |
829
|
|
|
} |
830
|
|
|
|
831
|
1568 |
|
if (isset($input['fixedLine'])) { |
832
|
1079 |
|
$desc = new PhoneNumberDesc(); |
833
|
1079 |
|
$this->setFixedLine($desc->fromArray($input['fixedLine'])); |
834
|
|
|
} |
835
|
|
|
|
836
|
1568 |
|
if (isset($input['mobile'])) { |
837
|
1079 |
|
$desc = new PhoneNumberDesc(); |
838
|
1079 |
|
$this->setMobile($desc->fromArray($input['mobile'])); |
839
|
|
|
} |
840
|
|
|
|
841
|
1568 |
|
if (isset($input['tollFree'])) { |
842
|
1568 |
|
$desc = new PhoneNumberDesc(); |
843
|
1568 |
|
$this->setTollFree($desc->fromArray($input['tollFree'])); |
844
|
|
|
} |
845
|
|
|
|
846
|
1568 |
|
if (isset($input['premiumRate'])) { |
847
|
1568 |
|
$desc = new PhoneNumberDesc(); |
848
|
1568 |
|
$this->setPremiumRate($desc->fromArray($input['premiumRate'])); |
849
|
|
|
} |
850
|
|
|
|
851
|
1568 |
|
if (isset($input['sharedCost'])) { |
852
|
1079 |
|
$desc = new PhoneNumberDesc(); |
853
|
1079 |
|
$this->setSharedCost($desc->fromArray($input['sharedCost'])); |
854
|
|
|
} |
855
|
|
|
|
856
|
1568 |
|
if (isset($input['personalNumber'])) { |
857
|
1079 |
|
$desc = new PhoneNumberDesc(); |
858
|
1079 |
|
$this->setPersonalNumber($desc->fromArray($input['personalNumber'])); |
859
|
|
|
} |
860
|
|
|
|
861
|
1568 |
|
if (isset($input['voip'])) { |
862
|
1079 |
|
$desc = new PhoneNumberDesc(); |
863
|
1079 |
|
$this->setVoip($desc->fromArray($input['voip'])); |
864
|
|
|
} |
865
|
|
|
|
866
|
1568 |
|
if (isset($input['pager'])) { |
867
|
1079 |
|
$desc = new PhoneNumberDesc(); |
868
|
1079 |
|
$this->setPager($desc->fromArray($input['pager'])); |
869
|
|
|
} |
870
|
|
|
|
871
|
1568 |
|
if (isset($input['uan'])) { |
872
|
1079 |
|
$desc = new PhoneNumberDesc(); |
873
|
1079 |
|
$this->setUan($desc->fromArray($input['uan'])); |
874
|
|
|
} |
875
|
|
|
|
876
|
1568 |
|
if (isset($input['emergency'])) { |
877
|
497 |
|
$desc = new PhoneNumberDesc(); |
878
|
497 |
|
$this->setEmergency($desc->fromArray($input['emergency'])); |
879
|
|
|
} |
880
|
|
|
|
881
|
1568 |
|
if (isset($input['voicemail'])) { |
882
|
1079 |
|
$desc = new PhoneNumberDesc(); |
883
|
1079 |
|
$this->setVoicemail($desc->fromArray($input['voicemail'])); |
884
|
|
|
} |
885
|
|
|
|
886
|
1568 |
|
if (isset($input['shortCode'])) { |
887
|
497 |
|
$desc = new PhoneNumberDesc(); |
888
|
497 |
|
$this->setShortCode(($desc->fromArray($input['shortCode']))); |
889
|
|
|
} |
890
|
|
|
|
891
|
1568 |
|
if (isset($input['standardRate'])) { |
892
|
497 |
|
$desc = new PhoneNumberDesc(); |
893
|
497 |
|
$this->setStandardRate($desc->fromArray($input['standardRate'])); |
894
|
|
|
} |
895
|
|
|
|
896
|
1568 |
|
if (isset($input['carrierSpecific'])) { |
897
|
497 |
|
$desc = new PhoneNumberDesc(); |
898
|
497 |
|
$this->setCarrierSpecific($desc->fromArray($input['carrierSpecific'])); |
899
|
|
|
} |
900
|
|
|
|
901
|
1568 |
|
if (isset($input['noInternationalDialling'])) { |
902
|
1079 |
|
$desc = new PhoneNumberDesc(); |
903
|
1079 |
|
$this->setNoInternationalDialling($desc->fromArray($input['noInternationalDialling'])); |
904
|
|
|
} |
905
|
|
|
|
906
|
1568 |
|
$this->setId($input['id']); |
907
|
1568 |
|
$this->setCountryCode($input['countryCode']); |
908
|
1568 |
|
$this->setInternationalPrefix($input['internationalPrefix']); |
909
|
|
|
|
910
|
1568 |
|
if (isset($input['preferredInternationalPrefix'])) { |
911
|
90 |
|
$this->setPreferredInternationalPrefix($input['preferredInternationalPrefix']); |
912
|
|
|
} |
913
|
1568 |
|
if (isset($input['nationalPrefix'])) { |
914
|
752 |
|
$this->setNationalPrefix($input['nationalPrefix']); |
915
|
|
|
} |
916
|
1568 |
|
if (isset($input['nationalPrefix'])) { |
917
|
752 |
|
$this->setNationalPrefix($input['nationalPrefix']); |
918
|
|
|
} |
919
|
|
|
|
920
|
1568 |
|
if (isset($input['preferredExtnPrefix'])) { |
921
|
200 |
|
$this->setPreferredExtnPrefix($input['preferredExtnPrefix']); |
922
|
|
|
} |
923
|
|
|
|
924
|
1568 |
|
if (isset($input['nationalPrefixForParsing'])) { |
925
|
768 |
|
$this->setNationalPrefixForParsing($input['nationalPrefixForParsing']); |
926
|
|
|
} |
927
|
|
|
|
928
|
1568 |
|
if (isset($input['nationalPrefixTransformRule'])) { |
929
|
50 |
|
$this->setNationalPrefixTransformRule($input['nationalPrefixTransformRule']); |
930
|
|
|
} |
931
|
|
|
|
932
|
1568 |
|
foreach ($input['numberFormat'] as $numberFormatElt) { |
933
|
975 |
|
$numberFormat = new NumberFormat(); |
934
|
975 |
|
$numberFormat->fromArray($numberFormatElt); |
935
|
975 |
|
$this->addNumberFormat($numberFormat); |
936
|
|
|
} |
937
|
|
|
|
938
|
1568 |
|
foreach ($input['intlNumberFormat'] as $intlNumberFormatElt) { |
939
|
259 |
|
$numberFormat = new NumberFormat(); |
940
|
259 |
|
$numberFormat->fromArray($intlNumberFormatElt); |
941
|
259 |
|
$this->addIntlNumberFormat($numberFormat); |
942
|
|
|
} |
943
|
|
|
|
944
|
1568 |
|
$this->setMainCountryForCode($input['mainCountryForCode']); |
945
|
|
|
|
946
|
1568 |
|
if (isset($input['leadingDigits'])) { |
947
|
79 |
|
$this->setLeadingDigits($input['leadingDigits']); |
948
|
|
|
} |
949
|
|
|
|
950
|
1568 |
|
if (isset($input['leadingZeroPossible'])) { |
951
|
1568 |
|
$this->setLeadingZeroPossible($input['leadingZeroPossible']); |
952
|
|
|
} |
953
|
|
|
|
954
|
1568 |
|
if (isset($input['mobileNumberPortableRegion'])) { |
955
|
1568 |
|
$this->setMobileNumberPortableRegion($input['mobileNumberPortableRegion']); |
956
|
|
|
} |
957
|
|
|
|
958
|
1568 |
|
return $this; |
959
|
|
|
} |
960
|
|
|
|
961
|
983 |
|
public function addNumberFormat(NumberFormat $value) |
962
|
|
|
{ |
963
|
983 |
|
$this->numberFormat[] = $value; |
964
|
983 |
|
return $this; |
965
|
|
|
} |
966
|
|
|
|
967
|
271 |
|
public function addIntlNumberFormat(NumberFormat $value) |
968
|
|
|
{ |
969
|
271 |
|
$this->intlNumberFormat[] = $value; |
970
|
271 |
|
return $this; |
971
|
|
|
} |
972
|
|
|
} |
973
|
|
|
|