1 | <?php |
||
19 | class Sms implements SmsInterface |
||
20 | { |
||
21 | /** |
||
22 | * The SMS is sent to an operator |
||
23 | * |
||
24 | * @var integer |
||
25 | */ |
||
26 | const STATE_SENT = 0; |
||
27 | |||
28 | /** |
||
29 | * The SMS is accepted by an operator |
||
30 | * |
||
31 | * @var integer |
||
32 | */ |
||
33 | const STATE_ACCEPTED = 1; |
||
34 | |||
35 | /** |
||
36 | * The SMS is rejected by an operator |
||
37 | * |
||
38 | * @var integer |
||
39 | */ |
||
40 | const STATE_REJECTED = 2; |
||
41 | |||
42 | /** |
||
43 | * The SMS is delivered to a recipient |
||
44 | * |
||
45 | * @var integer |
||
46 | */ |
||
47 | const STATE_DELIVERED = 3; |
||
48 | |||
49 | /** |
||
50 | * The SMS is not delivered to a recipient |
||
51 | * |
||
52 | * @var integer |
||
53 | */ |
||
54 | const STATE_FAILED = 4; |
||
55 | |||
56 | /** |
||
57 | * The unique id of an SMS |
||
58 | * |
||
59 | * @var mixed |
||
60 | */ |
||
61 | protected $id; |
||
62 | |||
63 | /** |
||
64 | * The sender of an SMS |
||
65 | * |
||
66 | * @var string |
||
67 | */ |
||
68 | protected $sender; |
||
69 | |||
70 | /** |
||
71 | * The recipient of an SMS |
||
72 | * |
||
73 | * @var string |
||
74 | */ |
||
75 | protected $recipient; |
||
76 | |||
77 | /** |
||
78 | * The message of an SMS |
||
79 | * |
||
80 | * @var string |
||
81 | */ |
||
82 | protected $message; |
||
83 | |||
84 | /** |
||
85 | * The state of an SMS |
||
86 | * |
||
87 | * @var integer |
||
88 | */ |
||
89 | protected $state; |
||
90 | |||
91 | /** |
||
92 | * The created date of an SMS |
||
93 | * |
||
94 | * @var \DateTime |
||
95 | */ |
||
96 | protected $createdAt; |
||
97 | |||
98 | /** |
||
99 | * The updated date of an SMS |
||
100 | * |
||
101 | * @var \DateTime |
||
102 | */ |
||
103 | protected $updatedAt; |
||
104 | |||
105 | /** |
||
106 | * Constructor |
||
107 | */ |
||
108 | public function __construct() |
||
112 | |||
113 | /** |
||
114 | * Gets the id |
||
115 | * |
||
116 | * @return mixed |
||
117 | */ |
||
118 | public function getId() |
||
122 | |||
123 | /** |
||
124 | * {@inheritDoc} |
||
125 | */ |
||
126 | public function setSender($sender) |
||
132 | |||
133 | /** |
||
134 | * {@inheritDoc} |
||
135 | */ |
||
136 | public function getSender() |
||
140 | |||
141 | /** |
||
142 | * {@inheritDoc} |
||
143 | */ |
||
144 | public function setRecipient($recipient) |
||
150 | |||
151 | /** |
||
152 | * {@inheritDoc} |
||
153 | */ |
||
154 | public function getRecipient() |
||
158 | |||
159 | /** |
||
160 | * {@inheritDoc} |
||
161 | */ |
||
162 | public function setMessage($message) |
||
168 | |||
169 | /** |
||
170 | * {@inheritDoc} |
||
171 | */ |
||
172 | public function getMessage() |
||
176 | |||
177 | /** |
||
178 | * {@inheritDoc} |
||
179 | */ |
||
180 | public function setState($state) |
||
190 | |||
191 | /** |
||
192 | * {@inheritDoc} |
||
193 | */ |
||
194 | public function getState() |
||
198 | |||
199 | /** |
||
200 | * {@inheritDoc} |
||
201 | */ |
||
202 | public function setCreatedAt(\DateTime $createdAt) |
||
208 | |||
209 | /** |
||
210 | * {@inheritDoc} |
||
211 | */ |
||
212 | public function getCreatedAt() |
||
216 | |||
217 | /** |
||
218 | * {@inheritDoc} |
||
219 | */ |
||
220 | public function setUpdatedAt(\DateTime $updatedAt) |
||
226 | |||
227 | /** |
||
228 | * {@inheritDoc} |
||
229 | */ |
||
230 | public function getUpdatedAt() |
||
234 | |||
235 | /** |
||
236 | * Gets all the states |
||
237 | * |
||
238 | * @return array |
||
239 | */ |
||
240 | public static function getStates() |
||
250 | } |
||
251 |