@@ 168-178 (lines=11) @@ | ||
165 | * @param bool $checkAll True will search for any type of license. False only for types 1 or 2 |
|
166 | * @return false|array (list<int>): List of registered license types or empty list if no license found |
|
167 | */ |
|
168 | public function xmlIsLicensed($ipAddress, $checkAll = true) { |
|
169 | $xmlClient = $this->xmlClient; |
|
170 | try { |
|
171 | $this->response = $xmlClient->is_licensed($this->authToken(), $ipAddress, $checkAll); |
|
172 | } catch (\Exception $e) { |
|
173 | $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
174 | $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
175 | return false; |
|
176 | } |
|
177 | return $this->response; |
|
178 | } |
|
179 | ||
180 | /** |
|
181 | * Will register IP based license for authorized user. |
|
@@ 280-290 (lines=11) @@ | ||
277 | * @throws XmlRpcException for critical errors |
|
278 | * @return false|array (list<structure>): List of structures or empty list. Each structure contains keys: IP(string) TYPE(int) license type REGISTERED(boolean) True if server was registered in CLN with this license |
|
279 | */ |
|
280 | public function reconcile() { |
|
281 | $xmlClient = $this->xmlClient; |
|
282 | try { |
|
283 | $this->response = $xmlClient->reconcile($this->authToken()); |
|
284 | } catch (\Exception $e) { |
|
285 | $this->log('error', 'Caught exception code: ' . $e->getCode()); |
|
286 | $this->log('error', 'Caught exception message: ' . $e->getMessage()); |
|
287 | return false; |
|
288 | } |
|
289 | return $this->response; |
|
290 | } |
|
291 | ||
292 | /** |
|
293 | * alias function to get a list of licenses |