@@ 156-166 (lines=11) @@ | ||
153 | * |
|
154 | * @return bool True if SMS was sent successfully, otherwise - false |
|
155 | */ |
|
156 | public function smsIsSentSuccessfully($messageId) |
|
157 | { |
|
158 | $response = $this->sendRequestToCheckStatusOfSMS($messageId); |
|
159 | ||
160 | $result = false; |
|
161 | if (isset($response['status']) && SinchSmsStatus::SUCCESSFUL === $response['status']) { |
|
162 | $result = true; |
|
163 | } |
|
164 | ||
165 | return $result; |
|
166 | } |
|
167 | ||
168 | /** |
|
169 | * Returns true if SMS with some ID is still pending, otherwise returns false |
|
@@ 175-185 (lines=11) @@ | ||
172 | * |
|
173 | * @return bool True if SMS is still pending, otherwise - false |
|
174 | */ |
|
175 | public function smsIsPending($messageId) |
|
176 | { |
|
177 | $response = $this->sendRequestToCheckStatusOfSMS($messageId); |
|
178 | ||
179 | $result = false; |
|
180 | if (isset($response['status']) && SinchSmsStatus::PENDING === $response['status']) { |
|
181 | $result = true; |
|
182 | } |
|
183 | ||
184 | return $result; |
|
185 | } |
|
186 | ||
187 | /** |
|
188 | * Returns true if SMS with some ID was faulted, otherwise returns false |
|
@@ 194-204 (lines=11) @@ | ||
191 | * |
|
192 | * @return bool True if SMS was faulted, otherwise - false |
|
193 | */ |
|
194 | public function smsIsFaulted($messageId) |
|
195 | { |
|
196 | $response = $this->sendRequestToCheckStatusOfSMS($messageId); |
|
197 | ||
198 | $result = false; |
|
199 | if (isset($response['status']) && SinchSmsStatus::FAULTED === $response['status']) { |
|
200 | $result = true; |
|
201 | } |
|
202 | ||
203 | return $result; |
|
204 | } |
|
205 | ||
206 | /** |
|
207 | * Returns true if SMS with some ID in unknown status, otherwise returns false |
|
@@ 213-223 (lines=11) @@ | ||
210 | * |
|
211 | * @return bool True if SMS in unknown status, otherwise - false |
|
212 | */ |
|
213 | public function smsInUnknownStatus($messageId) |
|
214 | { |
|
215 | $response = $this->sendRequestToCheckStatusOfSMS($messageId); |
|
216 | ||
217 | $result = false; |
|
218 | if (isset($response['status']) && SinchSmsStatus::UNKNOWN === $response['status']) { |
|
219 | $result = true; |
|
220 | } |
|
221 | ||
222 | return $result; |
|
223 | } |
|
224 | ||
225 | // endregion |
|
226 |