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 | 1375 | public function __construct() |
|
26 | { |
||
27 | 1375 | $this->clear(); |
|
28 | 1375 | } |
|
29 | |||
30 | /** |
||
31 | * @return PhoneNumberDesc |
||
32 | */ |
||
33 | 1375 | public function clear() |
|
43 | |||
44 | /** |
||
45 | * @return array |
||
46 | */ |
||
47 | 3274 | public function getPossibleLength() |
|
51 | |||
52 | /** |
||
53 | * @param array $possibleLength |
||
54 | */ |
||
55 | 1363 | public function setPossibleLength($possibleLength) |
|
59 | |||
60 | 5 | public function addPossibleLength($possibleLength) |
|
61 | { |
||
62 | 5 | if (!in_array($possibleLength, $this->possibleLength)) { |
|
63 | 5 | $this->possibleLength[] = $possibleLength; |
|
64 | 5 | } |
|
65 | 5 | } |
|
66 | |||
67 | 1375 | public function clearPossibleLength() |
|
71 | |||
72 | /** |
||
73 | * @return array |
||
74 | */ |
||
75 | 3224 | public function getPossibleLengthLocalOnly() |
|
79 | |||
80 | /** |
||
81 | * @param array $possibleLengthLocalOnly |
||
82 | */ |
||
83 | 1349 | public function setPossibleLengthLocalOnly($possibleLengthLocalOnly) |
|
87 | |||
88 | 1 | public function addPossibleLengthLocalOnly($possibleLengthLocalOnly) |
|
89 | { |
||
90 | 1 | if (!in_array($possibleLengthLocalOnly, $this->possibleLengthLocalOnly)) { |
|
91 | 1 | $this->possibleLengthLocalOnly[] = $possibleLengthLocalOnly; |
|
92 | 1 | } |
|
93 | 1 | } |
|
94 | |||
95 | 1375 | public function clearPossibleLengthLocalOnly() |
|
99 | |||
100 | /** |
||
101 | * @return boolean |
||
102 | */ |
||
103 | 482 | public function hasNationalNumberPattern() |
|
104 | { |
||
105 | 482 | return $this->hasNationalNumberPattern; |
|
106 | } |
||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | 2924 | public function getNationalNumberPattern() |
|
115 | |||
116 | /** |
||
117 | * @param string $value |
||
118 | * @return PhoneNumberDesc |
||
119 | */ |
||
120 | 1353 | public function setNationalNumberPattern($value) |
|
127 | |||
128 | /** |
||
129 | * @return boolean |
||
130 | */ |
||
131 | 482 | public function hasPossibleNumberPattern() |
|
132 | { |
||
133 | 482 | return $this->hasPossibleNumberPattern; |
|
134 | } |
||
135 | |||
136 | /** |
||
137 | * @return string |
||
138 | */ |
||
139 | 1094 | public function getPossibleNumberPattern() |
|
143 | |||
144 | /** |
||
145 | * @param string $value |
||
146 | * @return PhoneNumberDesc |
||
147 | */ |
||
148 | 1355 | public function setPossibleNumberPattern($value) |
|
155 | |||
156 | /** |
||
157 | * @return string |
||
158 | */ |
||
159 | 5346 | public function hasExampleNumber() |
|
163 | |||
164 | /** |
||
165 | * @return string |
||
166 | */ |
||
167 | 3177 | public function getExampleNumber() |
|
171 | |||
172 | /** |
||
173 | * @param string $value |
||
174 | * @return PhoneNumberDesc |
||
175 | */ |
||
176 | 1331 | public function setExampleNumber($value) |
|
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 | 482 | public function toArray() |
|
220 | { |
||
221 | 482 | $data = array(); |
|
222 | 482 | if ($this->hasNationalNumberPattern()) { |
|
223 | 482 | $data['NationalNumberPattern'] = $this->getNationalNumberPattern(); |
|
224 | 482 | } |
|
225 | 482 | if ($this->hasPossibleNumberPattern()) { |
|
226 | 482 | $data['PossibleNumberPattern'] = $this->getPossibleNumberPattern(); |
|
227 | 482 | } |
|
228 | 482 | if ($this->hasExampleNumber()) { |
|
229 | 482 | $data['ExampleNumber'] = $this->getExampleNumber(); |
|
230 | 482 | } |
|
231 | |||
232 | 482 | $data['PossibleLength'] = $this->getPossibleLength(); |
|
233 | 482 | $data['PossibleLengthLocalOnly'] = $this->getPossibleLengthLocalOnly(); |
|
234 | |||
235 | 482 | return $data; |
|
236 | } |
||
237 | |||
238 | /** |
||
239 | * @param array $input |
||
240 | * @return PhoneNumberDesc |
||
241 | */ |
||
242 | 1348 | public function fromArray(array $input) |
|
258 | } |
||
259 |