1 | <?php |
||
5 | class OrtcConfig |
||
6 | { |
||
7 | /** |
||
8 | * Realtime.co india cluster url. |
||
9 | * |
||
10 | * @var string |
||
11 | */ |
||
12 | protected $indiaClusterUrl = 'https://ortc-india.realtime.co/server/2.1'; |
||
13 | |||
14 | /** |
||
15 | * Realtime.co default url. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $clusterUrl = 'https://ortc-developers.realtime.co/server/2.1'; |
||
20 | |||
21 | /** |
||
22 | * Realtime.co cluster server. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $cluster = 'india'; |
||
27 | |||
28 | /** |
||
29 | * Realtime.co balancer url. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $balancerUrl = '?appkey={APP_KEY}'; |
||
34 | |||
35 | /** |
||
36 | * Your realtime.co application key. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $applicationKey; |
||
41 | |||
42 | /** |
||
43 | * Your realtime.co private key. |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $privateKey; |
||
48 | |||
49 | /** |
||
50 | * authentication path. |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $authenticationPath = '/authenticate'; |
||
55 | |||
56 | /** |
||
57 | * send push message to channel(s) path. |
||
58 | * |
||
59 | * @var string |
||
60 | */ |
||
61 | protected $sendPath = '/send'; |
||
62 | |||
63 | /** |
||
64 | * maximum size of message chunk in bytes. |
||
65 | * |
||
66 | * @var int |
||
67 | */ |
||
68 | protected $maxChunkSize = 700; |
||
69 | |||
70 | /** |
||
71 | * maximum size of message chunk in bytes. |
||
72 | * |
||
73 | * @var int |
||
74 | */ |
||
75 | protected $batchPoolSize = 5; |
||
76 | |||
77 | /** |
||
78 | * pre concatenating string for every message chunks. |
||
79 | * |
||
80 | * @var string |
||
81 | */ |
||
82 | protected $preMessageString = '{RANDOM}_{PART}-{TOTAL_PARTS}_'; |
||
83 | |||
84 | /** |
||
85 | * verify ssl/tls certificate. |
||
86 | * |
||
87 | * @var bool |
||
88 | */ |
||
89 | protected $verifySsl = true; |
||
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getApplicationKey() |
||
98 | |||
99 | /** |
||
100 | * @param string $applicationKey |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function setApplicationKey($applicationKey) |
||
108 | |||
109 | /** |
||
110 | * @return string |
||
111 | */ |
||
112 | public function getBalancedUrl() |
||
113 | { |
||
114 | return $this->clusterUrl . $this->balancerUrl; |
||
115 | } |
||
116 | |||
117 | /** |
||
118 | * @param string $balancedUrl |
||
119 | * @return $this |
||
120 | */ |
||
121 | public function setBalancedUrl($balancedUrl) |
||
122 | { |
||
123 | $this->balancerUrl = $balancedUrl; |
||
124 | return $this; |
||
125 | } |
||
126 | |||
127 | /** |
||
128 | * @return string |
||
129 | */ |
||
130 | public function getClusterUrl() |
||
134 | |||
135 | /** |
||
136 | * @param string $clusterUrl |
||
137 | * @return $this |
||
138 | */ |
||
139 | public function setClusterUrl($clusterUrl) |
||
144 | |||
145 | /** |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getCluster() |
||
152 | |||
153 | /** |
||
154 | * @param string $cluster |
||
155 | * @return $this |
||
156 | */ |
||
157 | public function setCluster($cluster) |
||
162 | |||
163 | /** |
||
164 | * @return string |
||
165 | */ |
||
166 | public function getPrivateKey() |
||
170 | |||
171 | /** |
||
172 | * @param string $privateKey |
||
173 | * @return $this |
||
174 | */ |
||
175 | public function setPrivateKey($privateKey) |
||
180 | |||
181 | /** |
||
182 | * @return string |
||
183 | */ |
||
184 | public function getAuthenticationPath() |
||
188 | |||
189 | /** |
||
190 | * @param string $authenticationPath |
||
191 | * @return $this |
||
192 | */ |
||
193 | public function setAuthenticationPath($authenticationPath) |
||
198 | |||
199 | /** |
||
200 | * @return string |
||
201 | */ |
||
202 | public function getSendPath() |
||
206 | |||
207 | /** |
||
208 | * @param string $sendPath |
||
209 | * @return $this |
||
210 | */ |
||
211 | public function setSendPath($sendPath) |
||
216 | |||
217 | /** |
||
218 | * @return int |
||
219 | */ |
||
220 | public function getMaxChunkSize() |
||
224 | |||
225 | /** |
||
226 | * @param int $maxChunkSize |
||
227 | * @return $this |
||
228 | */ |
||
229 | public function setMaxChunkSize($maxChunkSize) |
||
234 | |||
235 | /** |
||
236 | * @return string |
||
237 | */ |
||
238 | public function getPreMessageString() |
||
242 | |||
243 | /** |
||
244 | * @param string $preMessageString |
||
245 | * @return $this |
||
246 | */ |
||
247 | public function setPreMessageString($preMessageString) |
||
252 | |||
253 | /** |
||
254 | * @return bool |
||
255 | */ |
||
256 | public function isVerifySsl() |
||
260 | |||
261 | /** |
||
262 | * @param bool $verifySsl |
||
263 | * @return $this |
||
264 | */ |
||
265 | public function setVerifySsl($verifySsl) |
||
270 | |||
271 | /** |
||
272 | * @return int |
||
273 | */ |
||
274 | public function getBatchPoolSize() |
||
278 | |||
279 | /** |
||
280 | * @param int $batchPoolSize |
||
281 | * @return $this |
||
282 | */ |
||
283 | public function setBatchPoolSize($batchPoolSize) |
||
289 | } |
||
290 |