1
|
|
|
<?php |
2
|
|
|
namespace Eduardokum\CorreiosPhp\Entities; |
3
|
|
|
|
4
|
|
|
use Eduardokum\CorreiosPhp\Traits\MagicTrait; |
5
|
|
|
|
6
|
|
|
class Sender |
7
|
|
|
{ |
8
|
|
|
use MagicTrait; |
9
|
|
|
|
10
|
|
|
private $logo; |
11
|
|
|
private $name; |
12
|
|
|
private $street; |
13
|
|
|
private $number; |
14
|
|
|
private $complement; |
15
|
|
|
private $district; |
16
|
|
|
private $cep; |
17
|
|
|
private $city; |
18
|
|
|
private $state; |
19
|
|
|
private $phone; |
20
|
|
|
private $cellphone; |
21
|
|
|
private $mail; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @return mixed |
25
|
|
|
*/ |
26
|
|
|
public function getLogo() |
27
|
|
|
{ |
28
|
|
|
return $this->logo; |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @param mixed $logo |
33
|
|
|
* |
34
|
|
|
* @return Sender |
35
|
|
|
*/ |
36
|
|
|
public function setLogo($logo) |
37
|
|
|
{ |
38
|
|
|
$this->logo = $logo; |
39
|
|
|
|
40
|
|
|
return $this; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @return mixed |
45
|
|
|
*/ |
46
|
|
|
public function getName() |
47
|
|
|
{ |
48
|
|
|
return $this->name; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @param mixed $name |
53
|
|
|
* |
54
|
|
|
* @return Sender |
55
|
|
|
*/ |
56
|
|
|
public function setName($name) |
57
|
|
|
{ |
58
|
|
|
$this->name = substr($name, 0, 50); |
59
|
|
|
|
60
|
|
|
return $this; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @return mixed |
65
|
|
|
*/ |
66
|
|
|
public function getStreet() |
67
|
|
|
{ |
68
|
|
|
return $this->street; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @param mixed $street |
73
|
|
|
* |
74
|
|
|
* @return Sender |
75
|
|
|
*/ |
76
|
|
|
public function setStreet($street) |
77
|
|
|
{ |
78
|
|
|
$this->street = substr($street, 0, 50); |
79
|
|
|
|
80
|
|
|
return $this; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @return mixed |
85
|
|
|
*/ |
86
|
|
|
public function getNumber() |
87
|
|
|
{ |
88
|
|
|
return $this->number; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @param mixed $number |
93
|
|
|
* |
94
|
|
|
* @return Sender |
95
|
|
|
*/ |
96
|
|
|
public function setNumber($number) |
97
|
|
|
{ |
98
|
|
|
$this->number = $number; |
99
|
|
|
|
100
|
|
|
return $this; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @return mixed |
105
|
|
|
*/ |
106
|
|
|
public function getComplement() |
107
|
|
|
{ |
108
|
|
|
return $this->complement; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @param mixed $complement |
113
|
|
|
* |
114
|
|
|
* @return Sender |
115
|
|
|
*/ |
116
|
|
|
public function setComplement($complement) |
117
|
|
|
{ |
118
|
|
|
$this->complement = substr($complement, 0, 30); |
119
|
|
|
|
120
|
|
|
return $this; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return mixed |
125
|
|
|
*/ |
126
|
|
|
public function getDistrict() |
127
|
|
|
{ |
128
|
|
|
return $this->district; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @param mixed $district |
133
|
|
|
* |
134
|
|
|
* @return Sender |
135
|
|
|
*/ |
136
|
|
|
public function setDistrict($district) |
137
|
|
|
{ |
138
|
|
|
$this->district = substr($district, 0, 30); |
139
|
|
|
|
140
|
|
|
return $this; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @return mixed |
145
|
|
|
*/ |
146
|
|
|
public function getCep() |
147
|
|
|
{ |
148
|
|
|
return $this->cep; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* @param mixed $cep |
153
|
|
|
* |
154
|
|
|
* @return Sender |
155
|
|
|
*/ |
156
|
|
|
public function setCep($cep) |
157
|
|
|
{ |
158
|
|
|
$this->cep = $cep; |
159
|
|
|
|
160
|
|
|
return $this; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @return mixed |
165
|
|
|
*/ |
166
|
|
|
public function getCity() |
167
|
|
|
{ |
168
|
|
|
return $this->city; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @param mixed $city |
173
|
|
|
* |
174
|
|
|
* @return Sender |
175
|
|
|
*/ |
176
|
|
|
public function setCity($city) |
177
|
|
|
{ |
178
|
|
|
$this->city = substr($city, 0, 30); |
179
|
|
|
|
180
|
|
|
return $this; |
181
|
|
|
} |
182
|
|
|
|
183
|
|
|
/** |
184
|
|
|
* @return mixed |
185
|
|
|
*/ |
186
|
|
|
public function getState() |
187
|
|
|
{ |
188
|
|
|
return $this->state; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
/** |
192
|
|
|
* @param mixed $state |
193
|
|
|
* |
194
|
|
|
* @return Sender |
195
|
|
|
*/ |
196
|
|
|
public function setState($state) |
197
|
|
|
{ |
198
|
|
|
$this->state = substr($state, 0, 2); |
199
|
|
|
|
200
|
|
|
return $this; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @return mixed |
205
|
|
|
*/ |
206
|
|
|
public function getPhone() |
207
|
|
|
{ |
208
|
|
|
return $this->phone; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* @param mixed $phone |
213
|
|
|
* |
214
|
|
|
* @return Sender |
215
|
|
|
*/ |
216
|
|
|
public function setPhone($phone) |
217
|
|
|
{ |
218
|
|
|
$this->phone = substr($phone, 0, 12); |
219
|
|
|
|
220
|
|
|
return $this; |
221
|
|
|
} |
222
|
|
|
|
223
|
|
|
/** |
224
|
|
|
* @return mixed |
225
|
|
|
*/ |
226
|
|
|
public function getCellphone() |
227
|
|
|
{ |
228
|
|
|
return $this->cellphone; |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* @param mixed $cellphone |
233
|
|
|
* |
234
|
|
|
* @return Sender |
235
|
|
|
*/ |
236
|
|
|
public function setCellphone($cellphone) |
237
|
|
|
{ |
238
|
|
|
$this->cellphone = substr($cellphone, 0, 12); |
239
|
|
|
|
240
|
|
|
return $this; |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* @return mixed |
245
|
|
|
*/ |
246
|
|
|
public function getMail() |
247
|
|
|
{ |
248
|
|
|
return $this->mail; |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
/** |
252
|
|
|
* @param mixed $mail |
253
|
|
|
* |
254
|
|
|
* @return Sender |
255
|
|
|
*/ |
256
|
|
|
public function setMail($mail) |
257
|
|
|
{ |
258
|
|
|
$this->mail = substr($mail, 0, 50); |
259
|
|
|
|
260
|
|
|
return $this; |
261
|
|
|
} |
262
|
|
|
} |
263
|
|
|
|