1 | <?php |
||
8 | class PhoneNumberDesc |
||
9 | { |
||
10 | protected $hasNationalNumberPattern = false; |
||
11 | protected $nationalNumberPattern = ""; |
||
12 | protected $hasPossibleNumberPattern = false; |
||
13 | protected $possibleNumberPattern = ""; |
||
14 | protected $hasExampleNumber = false; |
||
15 | protected $exampleNumber = ""; |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $possibleLength; |
||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $possibleLengthLocalOnly; |
||
24 | |||
25 | public function __construct() |
||
29 | |||
30 | 267 | /** |
|
31 | * @return PhoneNumberDesc |
||
32 | */ |
||
33 | public function clear() |
||
43 | |||
44 | /** |
||
45 | * @return array |
||
46 | */ |
||
47 | public function getPossibleLength() |
||
51 | |||
52 | /** |
||
53 | * @param array $possibleLength |
||
54 | */ |
||
55 | public function setPossibleLength($possibleLength) |
||
59 | |||
60 | public function addPossibleLength($possibleLength) |
||
61 | { |
||
62 | if (!in_array($possibleLength, $this->possibleLength)) { |
||
63 | $this->possibleLength[] = $possibleLength; |
||
64 | } |
||
65 | } |
||
66 | |||
67 | public function clearPossibleLength() |
||
68 | { |
||
69 | $this->possibleLength = array(); |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @return array |
||
74 | */ |
||
75 | public function getPossibleLengthLocalOnly() |
||
79 | |||
80 | /** |
||
81 | * @param array $possibleLengthLocalOnly |
||
82 | */ |
||
83 | public function setPossibleLengthLocalOnly($possibleLengthLocalOnly) |
||
84 | 2415 | { |
|
85 | $this->possibleLengthLocalOnly = $possibleLengthLocalOnly; |
||
86 | 2415 | } |
|
87 | |||
88 | public function addPossibleLengthLocalOnly($possibleLengthLocalOnly) |
||
89 | { |
||
90 | if (!in_array($possibleLengthLocalOnly, $this->possibleLengthLocalOnly)) { |
||
91 | $this->possibleLengthLocalOnly[] = $possibleLengthLocalOnly; |
||
92 | } |
||
93 | 7 | } |
|
94 | |||
95 | 7 | public function clearPossibleLengthLocalOnly() |
|
99 | |||
100 | /** |
||
101 | * @return boolean |
||
102 | */ |
||
103 | public function hasNationalNumberPattern() |
||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getNationalNumberPattern() |
||
112 | { |
||
113 | return $this->nationalNumberPattern; |
||
114 | } |
||
115 | |||
116 | /** |
||
117 | * @param string $value |
||
118 | * @return PhoneNumberDesc |
||
119 | */ |
||
120 | public function setNationalNumberPattern($value) |
||
121 | { |
||
122 | $this->hasNationalNumberPattern = true; |
||
123 | $this->nationalNumberPattern = $value; |
||
124 | 1 | ||
125 | return $this; |
||
126 | 1 | } |
|
127 | 1 | ||
128 | 1 | /** |
|
129 | 1 | * @return boolean |
|
130 | */ |
||
131 | public function hasPossibleNumberPattern() |
||
135 | |||
136 | /** |
||
137 | * @return string |
||
138 | */ |
||
139 | public function getPossibleNumberPattern() |
||
140 | { |
||
141 | return $this->possibleNumberPattern; |
||
142 | } |
||
143 | |||
144 | /** |
||
145 | * @param string $value |
||
146 | * @return PhoneNumberDesc |
||
147 | */ |
||
148 | public function setPossibleNumberPattern($value) |
||
149 | { |
||
150 | $this->hasPossibleNumberPattern = true; |
||
151 | $this->possibleNumberPattern = $value; |
||
152 | |||
153 | return $this; |
||
154 | } |
||
155 | |||
156 | /** |
||
157 | * @return string |
||
158 | */ |
||
159 | public function hasExampleNumber() |
||
160 | { |
||
161 | return $this->hasExampleNumber; |
||
162 | } |
||
163 | |||
164 | /** |
||
165 | * @return string |
||
166 | */ |
||
167 | public function getExampleNumber() |
||
168 | { |
||
169 | return $this->exampleNumber; |
||
170 | } |
||
171 | |||
172 | /** |
||
173 | * @param string $value |
||
174 | * @return PhoneNumberDesc |
||
175 | */ |
||
176 | public function setExampleNumber($value) |
||
177 | { |
||
178 | $this->hasExampleNumber = true; |
||
179 | $this->exampleNumber = $value; |
||
180 | |||
181 | return $this; |
||
182 | } |
||
183 | |||
184 | /** |
||
185 | * @param PhoneNumberDesc $other |
||
186 | * @return PhoneNumberDesc |
||
187 | */ |
||
188 | public function mergeFrom(PhoneNumberDesc $other) |
||
204 | |||
205 | /** |
||
206 | * @param PhoneNumberDesc $other |
||
207 | * @return boolean |
||
208 | */ |
||
209 | public function exactlySameAs(PhoneNumberDesc $other) |
||
215 | |||
216 | /** |
||
217 | * @return array |
||
218 | */ |
||
219 | public function toArray() |
||
237 | |||
238 | /** |
||
239 | * @param array $input |
||
240 | * @return PhoneNumberDesc |
||
241 | */ |
||
242 | public function fromArray(array $input) |
||
243 | { |
||
244 | if (isset($input['NationalNumberPattern']) && $input['NationalNumberPattern'] != '') { |
||
245 | $this->setNationalNumberPattern($input['NationalNumberPattern']); |
||
246 | } |
||
247 | if (isset($input['PossibleNumberPattern']) && $input['NationalNumberPattern'] != '') { |
||
248 | $this->setPossibleNumberPattern($input['PossibleNumberPattern']); |
||
258 | } |
||
259 |