1 | <?php |
||
19 | class Gateway implements GatewayInterface |
||
20 | { |
||
21 | /** |
||
22 | * The unique id of a gateway |
||
23 | * |
||
24 | * @var mixed |
||
25 | */ |
||
26 | protected $id; |
||
27 | |||
28 | /** |
||
29 | * The name of a gateway |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $name; |
||
34 | |||
35 | /** |
||
36 | * The host of a gateway |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $host; |
||
41 | |||
42 | /** |
||
43 | * The port of a gateway |
||
44 | * |
||
45 | * @var integer |
||
46 | */ |
||
47 | protected $port; |
||
48 | |||
49 | /** |
||
50 | * The interfaceVersion of a gateway |
||
51 | * |
||
52 | * @var integer |
||
53 | */ |
||
54 | protected $interfaceVersion; |
||
55 | |||
56 | /** |
||
57 | * The username of a gateway |
||
58 | * |
||
59 | * @var string |
||
60 | */ |
||
61 | protected $username; |
||
62 | |||
63 | /** |
||
64 | * The password of a gateway |
||
65 | * |
||
66 | * @var string |
||
67 | */ |
||
68 | protected $password; |
||
69 | |||
70 | /** |
||
71 | * The service numbers of a gateway |
||
72 | * |
||
73 | * @var array |
||
74 | */ |
||
75 | protected $serviceNumbers; |
||
76 | |||
77 | /** |
||
78 | * The prefix codes of a gateway |
||
79 | * |
||
80 | * @var array |
||
81 | */ |
||
82 | protected $prefixCodes; |
||
83 | |||
84 | /** |
||
85 | * The default configurations of a gateway |
||
86 | * |
||
87 | * @var array |
||
88 | */ |
||
89 | protected $configs = array( |
||
90 | 'persistent' => false, |
||
91 | 'debug' => false, |
||
92 | 'send_timeout' => 10000, |
||
93 | 'receive_timeout' => 10000, |
||
94 | 'sender' => array( |
||
95 | 'ton' => \SMPP::TON_UNKNOWN, |
||
96 | 'npi' => \SMPP::NPI_UNKNOWN |
||
97 | ), |
||
98 | 'recipient' => array( |
||
99 | 'ton' => \SMPP::TON_INTERNATIONAL, |
||
100 | 'npi' => \SMPP::NPI_E164 |
||
101 | ) |
||
102 | ); |
||
103 | |||
104 | /** |
||
105 | * Constructor |
||
106 | * |
||
107 | * @param string $host |
||
108 | * @param integer $port |
||
109 | * @param integer $interfaceVersion |
||
110 | * @param string $username |
||
111 | * @param string $password |
||
112 | * @param array $serviceNumbers |
||
113 | * @param array $prefixCodes |
||
114 | * @param array $configs |
||
115 | */ |
||
116 | public function __construct( |
||
135 | |||
136 | /** |
||
137 | * Gets the id |
||
138 | * |
||
139 | * @return mixed |
||
140 | */ |
||
141 | public function getId() |
||
145 | |||
146 | /** |
||
147 | * {@inheritDoc} |
||
148 | */ |
||
149 | public function setName($name) |
||
155 | |||
156 | /** |
||
157 | * {@inheritDoc} |
||
158 | */ |
||
159 | public function getName() |
||
163 | |||
164 | /** |
||
165 | * {@inheritDoc} |
||
166 | */ |
||
167 | public function getHost() |
||
171 | |||
172 | /** |
||
173 | * {@inheritDoc} |
||
174 | */ |
||
175 | public function getPort() |
||
179 | |||
180 | /** |
||
181 | * {@inheritDoc} |
||
182 | */ |
||
183 | public function getInterfaceVersion() |
||
187 | |||
188 | /** |
||
189 | * {@inheritDoc} |
||
190 | */ |
||
191 | public function getUsername() |
||
195 | |||
196 | /** |
||
197 | * {@inheritDoc} |
||
198 | */ |
||
199 | public function getPassword() |
||
203 | |||
204 | /** |
||
205 | * {@inheritDoc} |
||
206 | */ |
||
207 | public function getServiceNumbers() |
||
211 | |||
212 | /** |
||
213 | * {@inheritDoc} |
||
214 | */ |
||
215 | public function getPrefixCodes() |
||
219 | |||
220 | /** |
||
221 | * {@inheritDoc} |
||
222 | */ |
||
223 | public function getConfigs() |
||
227 | } |
||
228 |