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