Total Complexity | 7 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Banglalink extends BaseProvider |
||
8 | { |
||
9 | public function getUsername() |
||
10 | { |
||
11 | return $this->config['userID']; |
||
12 | } |
||
13 | |||
14 | public function mapParams($recipient, $message, array $params = []) |
||
15 | { |
||
16 | if (!preg_match($this->recipientPattern, $recipient, $matches)) { |
||
17 | return []; |
||
18 | } |
||
19 | |||
20 | $recipient = '880'.$matches[3]; |
||
21 | |||
22 | return [ |
||
23 | 'msisdn' => $recipient, |
||
24 | 'message' => preg_replace('/[^a-zA-Z0-9\.@!?&\-,%\(\):\"]/', ' ', $message), |
||
25 | ]; |
||
26 | } |
||
27 | |||
28 | public function getValidationRules() |
||
35 | ]; |
||
36 | } |
||
37 | |||
38 | public function parseResponse($response) |
||
43 | } |
||
44 | } |
||
45 |