1: <?php
2:
3: require_once APPPATH . 'third_party/tschiemer/autoload.php';
4:
5: 6: 7: 8: 9: 10: 11: 12: 13:
14: class Aspsms extends tschiemer\Aspsms\SimpleClient
15: {
16: 17: 18:
19: var $CI;
20:
21: public function __construct($config = array())
22: {
23: $this->CI = get_instance();
24:
25: $config_base = $this->CI->load->config('aspsms',TRUE);
26:
27:
28: foreach($config as $k => $v)
29: {
30: $config_base[$k] = $v;
31: }
32:
33:
34: parent::__construct($config_base);
35: }
36:
37:
38: 39: 40: 41: 42: 43: 44:
45: public function getStatusDescription($statusCode, $force_query = FALSE)
46: {
47: $param = array(
48: 'RequestName' => 'getStatusCodeDescription',
49: 'StatusCode' => $statusCode,
50: 'Userkey' => $this->userkey,
51: 'Password' => $this->password
52: );
53:
54: if ( ! $force_query)
55: {
56: $this->CI->lang->load('aspsms','english');
57: $status = $this->CI->lang->line('status_'.intval($statusCode));
58: if ($status !== NULL)
59: {
60:
61:
62: $this->lastRequest = new Aspsms\Request($param);
63:
64: $this->lastResponse = new \Aspsms\Response($this->lastRequest);
65: $this->lastResponse->statusCode(\Aspsms\Response::STAT_OK);
66: $this->lastResponse->result = $status;
67:
68: return $this->lastResponse->result();
69: }
70: }
71:
72:
73: return $this->send($param);
74: }
75: }
76: