1 | <?php |
||
8 | class NumberFormat |
||
9 | { |
||
10 | protected $pattern = null; |
||
11 | protected $format = null; |
||
12 | protected $leadingDigitsPattern = array(); |
||
13 | protected $nationalPrefixFormattingRule = null; |
||
14 | protected $domesticCarrierCodeFormattingRule = null; |
||
15 | |||
16 | /** |
||
17 | * @return boolean |
||
18 | */ |
||
19 | 3 | public function hasPattern() |
|
20 | { |
||
21 | 3 | return isset($this->pattern); |
|
22 | } |
||
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | 46 | public function getPattern() |
|
28 | { |
||
29 | 46 | return $this->pattern; |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param string $value |
||
34 | * @return NumberFormat |
||
35 | */ |
||
36 | 556 | public function setPattern($value) |
|
37 | { |
||
38 | 556 | $this->pattern = $value; |
|
39 | |||
40 | 556 | return $this; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * @return boolean |
||
45 | */ |
||
46 | 3 | public function hasFormat() |
|
47 | { |
||
48 | 3 | return isset($this->format); |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | 46 | public function getFormat() |
|
55 | { |
||
56 | 46 | return $this->format; |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * @param string $value |
||
61 | * @return NumberFormat |
||
62 | */ |
||
63 | 556 | public function setFormat($value) |
|
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | public function leadingDigitPatterns() |
||
74 | { |
||
75 | return $this->leadingDigitsPattern; |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @return int |
||
80 | */ |
||
81 | 44 | public function leadingDigitsPatternSize() |
|
82 | { |
||
83 | 44 | return count($this->leadingDigitsPattern); |
|
84 | } |
||
85 | |||
86 | /** |
||
87 | * @param int $index |
||
88 | * @return string |
||
89 | */ |
||
90 | 39 | public function getLeadingDigitsPattern($index) |
|
94 | |||
95 | /** |
||
96 | * @param string $value |
||
97 | * @return NumberFormat |
||
98 | */ |
||
99 | 410 | public function addLeadingDigitsPattern($value) |
|
105 | |||
106 | /** |
||
107 | * @return boolean |
||
108 | */ |
||
109 | 3 | public function hasNationalPrefixFormattingRule() |
|
110 | { |
||
111 | 3 | return isset($this->nationalPrefixFormattingRule); |
|
112 | } |
||
113 | |||
114 | /** |
||
115 | * @return string |
||
116 | */ |
||
117 | 42 | public function getNationalPrefixFormattingRule() |
|
118 | { |
||
119 | 42 | return $this->nationalPrefixFormattingRule; |
|
120 | } |
||
121 | |||
122 | /** |
||
123 | * @param string $value |
||
124 | * @return NumberFormat |
||
125 | */ |
||
126 | 556 | public function setNationalPrefixFormattingRule($value) |
|
132 | |||
133 | /** |
||
134 | * @return NumberFormat |
||
135 | */ |
||
136 | 2 | public function clearNationalPrefixFormattingRule() |
|
142 | |||
143 | /** |
||
144 | * @return boolean |
||
145 | */ |
||
146 | 3 | public function hasDomesticCarrierCodeFormattingRule() |
|
150 | |||
151 | /** |
||
152 | * @return string |
||
153 | */ |
||
154 | 4 | public function getDomesticCarrierCodeFormattingRule() |
|
158 | |||
159 | /** |
||
160 | * @param string $value |
||
161 | * @return NumberFormat |
||
162 | */ |
||
163 | 556 | public function setDomesticCarrierCodeFormattingRule($value) |
|
164 | { |
||
165 | 556 | $this->domesticCarrierCodeFormattingRule = $value; |
|
166 | |||
167 | 556 | return $this; |
|
168 | } |
||
169 | |||
170 | /** |
||
171 | * @param NumberFormat $other |
||
172 | * @return NumberFormat |
||
173 | */ |
||
174 | 3 | public function mergeFrom(NumberFormat $other) |
|
194 | |||
195 | /** |
||
196 | * @return array |
||
197 | */ |
||
198 | public function toArray() |
||
215 | |||
216 | /** |
||
217 | * @param array $input |
||
218 | */ |
||
219 | 556 | public function fromArray(array $input) |
|
234 | } |
||
235 |