Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
root.php
1<?php
2
4
8
9class Root extends Tools\XmlParser
10{
11 public function getMap()
12 {
13 return array(
14 '/phoneNumberMetadata/territories/' => new Tools\XmlField('ROOT', array(
15 'multiple' => false,
16 'subParser' => new Territories()
17 ))
18 );
19 }
20}
21
23{
24 public function getMap()
25 {
26 return array(
27 '/phoneNumberMetadata/territories/territory/' => new Tools\XmlField('territory', array(
28 'multiple' => true,
29 'subParser' => new Territory()
30 ))
31 );
32 }
33}
34
36{
37 public function getMap()
38 {
39 return array(
40 '/phoneNumberMetadata/territories/territory/@id' => new Tools\XmlField('id'),
41 '/phoneNumberMetadata/territories/territory/@countryCode' => new Tools\XmlField('countryCode'),
42 '/phoneNumberMetadata/territories/territory/@mainCountryForCode' => new Tools\BoolField('mainCountryForCode'),
43 '/phoneNumberMetadata/territories/territory/@leadingDigits' => new Tools\RegexField('leadingDigits'),
44 '/phoneNumberMetadata/territories/territory/@preferredInternationalPrefix' => new Tools\XmlField('preferredInternationalPrefix'),
45 '/phoneNumberMetadata/territories/territory/@internationalPrefix' => new Tools\XmlField('internationalPrefix'),
46 '/phoneNumberMetadata/territories/territory/@nationalPrefix' => new Tools\XmlField('nationalPrefix'),
47 '/phoneNumberMetadata/territories/territory/@nationalPrefixForParsing' => new Tools\XmlField('nationalPrefixForParsing'),
48 '/phoneNumberMetadata/territories/territory/@nationalPrefixTransformRule' => new Tools\XmlField('nationalPrefixTransformRule'),
49 '/phoneNumberMetadata/territories/territory/@preferredExtnPrefix' => new Tools\XmlField('preferredExtnPrefix'),
50 '/phoneNumberMetadata/territories/territory/@nationalPrefixFormattingRule' => new Tools\XmlField('nationalPrefixFormattingRule'),
51 '/phoneNumberMetadata/territories/territory/@nationalPrefixOptionalWhenFormatting' => new Tools\BoolField('nationalPrefixOptionalWhenFormatting'),
52 '/phoneNumberMetadata/territories/territory/@carrierCodeFormattingRule' => new Tools\XmlField('carrierCodeFormattingRule'),
53 '/phoneNumberMetadata/territories/territory/@mobileNumberPortableRegion' => new Tools\XmlField('mobileNumberPortableRegion'),
54 '/phoneNumberMetadata/territories/territory/references/' => new Tools\XmlField('references', array(
55 'subParser' => new References()
56 )),
57 '/phoneNumberMetadata/territories/territory/availableFormats/numberFormat/' => new Tools\XmlField('availableFormats', array(
58 'multiple' => true,
59 'subParser' => new NumberFormat()
60 )),
61 '/phoneNumberMetadata/territories/territory/generalDesc/' => new Tools\XmlField('generalDesc', array(
62 'subParser' => new GeneralDesc()
63 )),
64 '/phoneNumberMetadata/territories/territory/noInternationalDialling/' => new Tools\XmlField('noInternationalDialling', array(
65 'subParser' => new NumberFormatDesc('noInternationalDialling')
66 )),
67 '/phoneNumberMetadata/territories/territory/areaCodeOptional/' => new Tools\XmlField('areaCodeOptional', array(
68 'subParser' => new NumberFormatDesc('areaCodeOptional')
69 )),
70 '/phoneNumberMetadata/territories/territory/fixedLine/' => new Tools\XmlField('fixedLine', array(
71 'subParser' => new NumberFormatDesc('fixedLine')
72 )),
73 '/phoneNumberMetadata/territories/territory/mobile/' => new Tools\XmlField('mobile', array(
74 'subParser' => new NumberFormatDesc('mobile')
75 )),
76 '/phoneNumberMetadata/territories/territory/pager/' => new Tools\XmlField('pager', array(
77 'subParser' => new NumberFormatDesc('pager')
78 )),
79 '/phoneNumberMetadata/territories/territory/tollFree/' => new Tools\XmlField('tollFree', array(
80 'subParser' => new NumberFormatDesc('tollFree')
81 )),
82 '/phoneNumberMetadata/territories/territory/premiumRate/' => new Tools\XmlField('premiumRate', array(
83 'subParser' => new NumberFormatDesc('premiumRate')
84 )),
85 '/phoneNumberMetadata/territories/territory/sharedCost/' => new Tools\XmlField('sharedCost', array(
86 'subParser' => new NumberFormatDesc('sharedCost')
87 )),
88 '/phoneNumberMetadata/territories/territory/personalNumber/' => new Tools\XmlField('personalNumber', array(
89 'subParser' => new NumberFormatDesc('personalNumber')
90 )),
91 '/phoneNumberMetadata/territories/territory/voip/' => new Tools\XmlField('voip', array(
92 'subParser' => new NumberFormatDesc('voip')
93 )),
94 '/phoneNumberMetadata/territories/territory/uan/' => new Tools\XmlField('uan', array(
95 'subParser' => new NumberFormatDesc('uan')
96 )),
97 '/phoneNumberMetadata/territories/territory/voicemail/' => new Tools\XmlField('voicemail', array(
98 'subParser' => new NumberFormatDesc('voicemail')
99 )),
100 );
101 }
102}
103
105{
106 public function getMap()
107 {
108 return array(
109 '/phoneNumberMetadata/territories/territory/references/sourceUrl/' => new XmlField('sourceUrl', array(
110 'multiple' => true
111 )),
112 );
113 }
114}
115
117{
118 public function getMap()
119 {
120 return array(
121 '/phoneNumberMetadata/territories/territory/generalDesc/nationalNumberPattern/' => new Tools\RegexField('nationalNumberPattern')
122 );
123 }
124}
125
127{
128 protected $fieldName;
129 public function __construct($fieldName)
130 {
131 $this->fieldName = $fieldName;
132 return parent::__construct();
133 }
134
135 public function getMap()
136 {
137 return array(
138 '/phoneNumberMetadata/territories/territory/' . $this->fieldName . '/possibleLengths/@national' => new Tools\PossibleLengthField('possibleLengthNational'),
139 '/phoneNumberMetadata/territories/territory/' . $this->fieldName . '/possibleLengths/@localOnly' => new Tools\PossibleLengthField('possibleLengthLocalOnly'),
140 '/phoneNumberMetadata/territories/territory/' . $this->fieldName . '/exampleNumber/' => new XmlField('exampleNumber'),
141 '/phoneNumberMetadata/territories/territory/' . $this->fieldName . '/nationalNumberPattern/' => new RegexField('nationalNumberPattern')
142 );
143 }
144}
145
146
148{
149 public function getMap()
150 {
151 return array(
152 '/phoneNumberMetadata/territories/territory/availableFormats/numberFormat/leadingDigits/' => new RegexField('leadingDigits', array('multiple' => true)),
153 '/phoneNumberMetadata/territories/territory/availableFormats/numberFormat/format/' => new XmlField('format'),
154 '/phoneNumberMetadata/territories/territory/availableFormats/numberFormat/intlFormat/' => new XmlField('intlFormat'),
155 '/phoneNumberMetadata/territories/territory/availableFormats/numberFormat/@nationalPrefixFormattingRule' => new XmlField('nationalPrefixFormattingRule'),
156 '/phoneNumberMetadata/territories/territory/availableFormats/numberFormat/@nationalPrefixOptionalWhenFormatting' => new Tools\BoolField('nationalPrefixOptionalWhenFormatting'),
157 '/phoneNumberMetadata/territories/territory/availableFormats/numberFormat/@carrierCodeFormattingRule' => new XmlField('carrierCodeFormattingRule'),
158 '/phoneNumberMetadata/territories/territory/availableFormats/numberFormat/@pattern' => new XmlField('pattern'),
159 );
160 }
161}
162