Passed
Push — master ( db78b9...5a6451 )
by Joe
01:47
created

Parallels   B

Complexity

Total Complexity 40

Size/Duplication

Total Lines 983
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 2.25%

Importance

Changes 12
Bugs 0 Features 0
Metric Value
wmc 40
c 12
b 0
f 0
lcom 1
cbo 1
dl 0
loc 983
ccs 2
cts 89
cp 0.0225
rs 8

16 Methods

Rating   Name   Duplication   Size   Complexity  
A terminateKey() 0 4 1
A resetKey() 0 4 1
A activateKey() 0 4 1
A addNoteToKey() 0 4 1
B getMainKeyFromIp() 0 16 5
A authInfo() 0 3 1
D __construct() 0 26 11
B serverAddress() 0 10 5
A sendKeyByEmail() 0 7 2
B createKey() 0 39 5
B retrieveKey() 0 153 1
A getAvailableUpgrades() 0 4 1
A getKeyInfo() 0 4 1
A getKeysInfoByIP() 0 4 1
B getKeyNumbers() 0 124 1
B getAvailableKeyTypesAndFeatures() 0 310 2

How to fix   Complexity   

Complex Class

Complex classes like Parallels often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use Parallels, and based on these observations, apply Extract Interface, too.

1
<?php
2
/**
3
 * Parallels Functionality
4
 *
5
 * API Documentation at: .. ill fill this in later from forum posts
6
 *
7
 * Last Changed: $LastChangedDate: 2017-05-31 06:50:39 -0400 (Wed, 31 May 2017) $
8
 * @author detain
9
 * @copyright 2017
10
 * @package MyAdmin
11
 * @category Licenses
12
 */
13
14
namespace Detain\Parallels;
15
16
/**
17
 * Parallels
18
 *
19
 * @access public
20
 */
21
class Parallels {
22
	public $licenseType = 'billing'; // billing or purchase
23
	private $xmlOptions = ['sslverify' => FALSE];
24
	private $defaultUrl = 'https://ka.parallels.com:7050/';
25
	private $defaultDemoUrl = 'https://kademo.parallels.com:7050/';
26
	public $url = '';
27
	public $response;
28
	private $client = '';
29
	private $login = '';
30
	private $password = '';
31
	public $xml;
32
33
	/**
34
	 * @param NULL|string $login api login, NULL(default) to use the PARALLELS_KA_LOGIN setting
35
	 * @param NULL|string $password api password, NULL(default) to use the PARALLELS_KA_PASSWORD setting
36
	 * @param NULL|string $client api client, NULL(default) to use the PARALLELS_KA_CLIENT setting
37
	 * @param bool $demo defaults to FALSE, whether or not to use the demo interface instae dof the normal one
38
	 * @param NULL|array $xmlOptions array of optoins ot pass to xmlrpc2 client
39
	 */
40
	public function __construct($login = NULL, $password = NULL, $client = NULL, $demo = FALSE, $xmlOptions = NULL) {
0 ignored issues
show
Coding Style introduced by
__construct uses the super-global variable $GLOBALS which is generally not recommended.

Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable:

// Bad
class Router
{
    public function generate($path)
    {
        return $_SERVER['HOST'].$path;
    }
}

// Better
class Router
{
    private $host;

    public function __construct($host)
    {
        $this->host = $host;
    }

    public function generate($path)
    {
        return $this->host.$path;
    }
}

class Controller
{
    public function myAction(Request $request)
    {
        // Instead of
        $page = isset($_GET['page']) ? intval($_GET['page']) : 1;

        // Better (assuming you use the Symfony2 request)
        $page = $request->query->get('page', 1);
    }
}
Loading history...
41
		if (null === $login && defined('PARALLELS_KA_LOGIN'))
42
			$this->login = constant('PARALLELS_KA_LOGIN');
43
		else
44
			$this->login = $login;
45
		if (null === $password && defined('PARALLELS_KA_PASSWORD'))
46
			$this->password = constant('PARALLELS_KA_PASSWORD');
47
		else
48
			$this->password = $password;
49
		if (null !== $client)
50
			$this->client = $client;
51
		elseif (defined('PARALLELS_KA_CLIENT'))
52
			$this->client = constant('PARALLELS_KA_CLIENT');
53
		if ($demo === TRUE)
54
			$this->url = $this->defaultDemoUrl;
55
		elseif ($demo === FALSE)
56
			$this->url = $this->defaultUrl;
57
		else
58
			$this->url = $demo;
0 ignored issues
show
Documentation Bug introduced by
The property $url was declared of type string, but $demo is of type boolean. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
59
		if (null !== $xmlOptions)
60
			$this->xmlOptions = $xmlOptions;
61
		if (!isset($GLOBALS['HTTP_RAW_POST_DATA']))
62
			$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents('php://input');
63
		require_once 'XML/RPC2/Client.php';
64
		$this->xml = \XML_RPC2_Client::create($this->url, $this->xmlOptions);
65
	}
66
67
	/**
68
	 * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<string,string>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
69
	 */
70 1
	public function authInfo() {
71 1
		return ['login' => $this->login, 'password' => $this->password];
72
	}
73
74
	/**
75
	 * @param array $ips
76
	 * @param array $macs
77
	 * @return array
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use array<string,array>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
78
	 */
79
	public function serverAddress($ips = [], $macs = []) {
80
		if (!is_array($ips) && $ips != '')
81
			$ips = [$ips];
82
		if (!is_array($macs) && $macs != '')
83
			$macs = [$macs];
84
		return [
85
			'ips' => $ips,
86
			'macs' => $macs
87
		];
88
	}
89
90
	/**
91
	 * @param $key
92
	 * @return mixed
93
	 */
94
	public function terminateKey($key) {
95
		$this->response = $this->xml->__call('partner10.terminateKey', [$this->authInfo(), $key]);
96
		return $this->response;
97
	}
98
99
	/**
100
	 * @param $key
101
	 * @return mixed
102
	 */
103
	public function resetKey($key) {
104
		$this->response = $this->xml->__call('partner10.resetKey', [$this->authInfo(), $key]);
105
		return $this->response;
106
	}
107
108
	/**
109
	 * @param $key
110
	 * @return mixed
111
	 */
112
	public function activateKey($key) {
113
		$this->response = $this->xml->__call('partner10.activateKey', [$this->authInfo(), $key]);
114
		return $this->response;
115
	}
116
117
	/**
118
	 * @param $key
119
	 * @param $note
120
	 * @return mixed
121
	 */
122
	public function addNoteToKey($key, $note) {
123
		$this->response = $this->xml->__call('partner10.addNoteToKey', [$this->authInfo(), $key, $note]);
124
		return $this->response;
125
	}
126
127
	/**
128
	 * @param      $key
129
	 * @param bool $email
130
	 * @return mixed
131
	 */
132
	public function sendKeyByEmail($key, $email = FALSE) {
133
		if ($email === FALSE)
134
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', [$this->authInfo(), $key]);
135
		else
136
			$this->response = $this->xml->__call('partner10.sendKeyByEmail', [$this->authInfo(), $key, $email]);
137
		return $this->response;
138
	}
139
140
	/**
141
	 * @param       $keyType
142
	 * @param array $upgradePlans
143
	 * @param array $ips
144
	 * @param array $macs
145
	 * @param bool  $licenseType
146
	 * @param bool  $client
147
	 * @return mixed
148
	 */
149
	public function createKey($keyType, $upgradePlans = [], $ips = [], $macs = [], $licenseType = FALSE, $client = FALSE) {
150
		if (!is_array($ips) && $ips != '')
151
			$ips = [$ips];
152
		$this->response = $this->xml->__call('partner10.createKey', [
153
			                                                          $this->authInfo(),
154
			                                                          $this->serverAddress($ips, $macs), $client === FALSE ? $this->client : $client,
155
			                                                          $keyType,
156
			                                                          $upgradePlans, $licenseType === FALSE ? $this->LicenseType : $licenseType
0 ignored issues
show
Bug introduced by
The property LicenseType does not seem to exist. Did you mean licenseType?

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
157
		]
158
		);
159
		return $this->response;
160
		/* Success:
0 ignored issues
show
Unused Code Comprehensibility introduced by
41% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
161
		Array
162
		(
163
		[mainKeyNumber] => PLSK.00004266.0000
164
		[expirationDate] => stdClass Object
165
		(
166
		[scalar] => 20131209T00:00:00
167
		[xmlrpc_type] => datetime
168
		[timestamp] => 1386547200
169
		)
170
171
		[productKey] => DETAIN-2TVB02-ZT1R57-AY2442-6WN966
172
		[additionalKeysNumbers] => Array
173
		(
174
		)
175
176
		[resultCode] => 100
177
		[resultDesc] => PLSK.00004266.0000 has been successfully created.
178
		[updateDate] => stdClass Object
179
		(
180
		[scalar] => 20131129T00:00:00
181
		[xmlrpc_type] => datetime
182
		[timestamp] => 1385683200
183
		)
184
185
		)
186
		*/
187
	}
188
189
	/**
190
	 * @param $key
191
	 * @return mixed
192
	 */
193
	public function retrieveKey($key) {
194
		$this->response = $this->xml->__call('partner10.retrieveKey', [$this->authInfo(), $key]);
195
		return $this->response;
196
		/* Success
197
		Array
198
		(
199
		[keyExtension] => xml
200
		[resultCode] => 100
201
		[resultDesc] => PLSK.00005819.0000 has been successfully retrieved
202
		[keyNumber] => PLSK.00005819.0000
203
		[key] => stdClass Object
204
		(
205
		[scalar] => <?xml version="1.0" encoding="UTF-8"?><plesk-windows:key xmlns:plesk-windows="http://parallels.com/schemas/keys/products/plesk/windows/multi" core:format="openfusion-3" xmlns:core="http://parallels.com/schemas/keys/core/3">
206
		<!--Unique product Key number-->
207
		<core:key-number core:type="string">PLSK.00005819</core:key-number>
208
		<!--Key version-->
209
		<core:key-version core:type="string">0000</core:key-version>
210
		<!--Key description-->
211
		<core:description>
212
		<core:keytype>Parallels Plesk Panel 10.x/11.x and Later for Windows</core:keytype>
213
		<core:feature>Unlimited Domains w/1 yr SUS</core:feature>
214
		<core:feature>Parallels Web Presence Builder - 100 Sites</core:feature>
215
		<core:feature>Parallels PowerPack for Plesk (Windows)</core:feature>
216
		</core:description>
217
		<!--Product which this license is intended to work on-->
218
		<core:product core:type="string">plesk-win</core:product>
219
		<!--Supported product version-->
220
		<core:versions>
221
		<core:from core:type="string">10.0</core:from>
222
		<core:to core:type="string">any</core:to>
223
		</core:versions>
224
		<!--Date after which this license becomes usable (inclusive)-->
225
		<core:start-date core:type="date">instant</core:start-date>
226
		<!--Date before which this license is usable (exclusive)-->
227
		<core:expiration-date core:type="date">2013-12-02</core:expiration-date>
228
		<!--URL of the service endpoint to use when performing an autoupdate-->
229
		<core:license-server-url core:type="string">https://ka.parallels.com:5224/xmlrpc</core:license-server-url>
230
		<!--Date when product will try to perform an autoupdate-->
231
		<core:update-date core:type="date">2013-11-22</core:update-date>
232
		<core:update-ticket core:hidden="true" core:type="string">k0uj75wmlfa1a5hwmk-k43gy2ji0p2y1</core:update-ticket>
233
		<!--Number of domains-->
234
		<plesk-windows:domains core:type="integer">unlimited</plesk-windows:domains>
235
		<!--Number of clients-->
236
		<plesk-windows:clients core:type="integer">unlimited</plesk-windows:clients>
237
		<!--Number of webusers-->
238
		<plesk-windows:webusers core:type="integer">unlimited</plesk-windows:webusers>
239
		<!--Number of mailnames-->
240
		<plesk-windows:mailnames core:type="integer">unlimited</plesk-windows:mailnames>
241
		<!--Number of additional language pack(s)-->
242
		<plesk-windows:language-packs core:type="integer">0</plesk-windows:language-packs>
243
		<plesk-windows:mpc-id core:hidden="true" core:type="integer">0</plesk-windows:mpc-id>
244
		<plesk-windows:mpc-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-disabled>
245
		<!--Google tools-->
246
		<plesk-windows:google-tools core:type="boolean">true</plesk-windows:google-tools>
247
		<plesk-windows:mpc-mng-disabled core:hidden="true" core:type="boolean">false</plesk-windows:mpc-mng-disabled>
248
		<!--Number of slaves-->
249
		<plesk-windows:slaves core:type="integer">0</plesk-windows:slaves>
250
		<!--EventManager-->
251
		<plesk-windows:event-manager core:type="boolean">true</plesk-windows:event-manager>
252
		<!--Domains backup-->
253
		<plesk-windows:domains-backup core:type="boolean">true</plesk-windows:domains-backup>
254
		<!--Tomcat support-->
255
		<plesk-windows:tomcat-support core:type="boolean">true</plesk-windows:tomcat-support>
256
		<!--Subdomains-->
257
		<plesk-windows:subdomains-support core:type="boolean">true</plesk-windows:subdomains-support>
258
		<!--Backward key compatibility restriction-->
259
		<plesk-windows:backward-restriction core:type="integer">0</plesk-windows:backward-restriction>
260
		<!--Work Inside Virtuozzo-->
261
		<plesk-windows:vps-only core:type="boolean">false</plesk-windows:vps-only>
262
		<!--Work Inside Hyper-V-->
263
		<plesk-windows:hyper-v core:type="boolean">false</plesk-windows:hyper-v>
264
		<!--Work Inside VMware-->
265
		<plesk-windows:vmware core:type="boolean">false</plesk-windows:vmware>
266
		<!--Work Inside Xen-->
267
		<plesk-windows:xen core:type="boolean">false</plesk-windows:xen>
268
		<!--Work Inside KVM-->
269
		<plesk-windows:kvm core:type="boolean">false</plesk-windows:kvm>
270
		<!--Work Inside Parallels Hypervisor-->
271
		<plesk-windows:hypervisor core:type="boolean">false</plesk-windows:hypervisor>
272
		<!--Global changes-->
273
		<plesk-windows:global-changes core:type="boolean">true</plesk-windows:global-changes>
274
		<!--Shell access-->
275
		<plesk-windows:shell-access core:type="boolean">true</plesk-windows:shell-access>
276
		<!--Detailed traffic-->
277
		<plesk-windows:detailed-traffic core:type="boolean">true</plesk-windows:detailed-traffic>
278
		<!--Notification manager-->
279
		<plesk-windows:notification-manager core:type="boolean">true</plesk-windows:notification-manager>
280
		<!--Action log manager-->
281
		<plesk-windows:action-manager core:type="boolean">true</plesk-windows:action-manager>
282
		<!--Clients and Domains Expirations management-->
283
		<plesk-windows:expirations-manager core:type="boolean">true</plesk-windows:expirations-manager>
284
		<!--Client templates-->
285
		<plesk-windows:client-templates core:type="boolean">true</plesk-windows:client-templates>
286
		<!--Ability to use Application Vault-->
287
		<plesk-windows:appvault-support core:type="boolean">true</plesk-windows:appvault-support>
288
		<!--Ability to use SpamAssassin-->
289
		<plesk-windows:spamassasin-support core:type="boolean">true</plesk-windows:spamassasin-support>
290
		<!--Ability to use Trouble Ticketing System-->
291
		<plesk-windows:tts-support core:type="boolean">true</plesk-windows:tts-support>
292
		<!--Ability to use ColdFusion-->
293
		<plesk-windows:coldfusion-support core:type="boolean">true</plesk-windows:coldfusion-support>
294
		<plesk-windows:ask-update core:hidden="true" core:type="boolean">false</plesk-windows:ask-update>
295
		<plesk-windows:autoinstaller-config core:hidden="true" core:type="string">true</plesk-windows:autoinstaller-config>
296
		<!--Ability to use DrWeb-->
297
		<plesk-windows:drweb-support core:type="boolean">true</plesk-windows:drweb-support>
298
		<plesk-windows:store-id core:hidden="true" core:type="integer">1</plesk-windows:store-id>
299
		<!--Ability to use Migration Manager-->
300
		<plesk-windows:migration-manager core:type="boolean">true</plesk-windows:migration-manager>
301
		<!--Ability to use MS SQL-->
302
		<plesk-windows:mssql core:type="boolean">true</plesk-windows:mssql>
303
		<!--Allowed locales-->
304
		<plesk-windows:allowed-locales core:type="string">any</plesk-windows:allowed-locales>
305
		<!--Allows feature upgrades for this version-->
306
		<plesk-windows:feature-upgrades core:type="boolean">true</plesk-windows:feature-upgrades>
307
		<!--Parallels Plesk Billing accounts count-->
308
		<plesk-windows:modernbill-accounts core:type="integer">0</plesk-windows:modernbill-accounts>
309
		<!--Number of sites-->
310
		<plesk-windows:sitebuilder-sites core:type="integer">100</plesk-windows:sitebuilder-sites>
311
		<!--Enable Parallels Plesk Mobile Server Manager-->
312
		<plesk-windows:mobile-server-manager-support core:type="boolean">true</plesk-windows:mobile-server-manager-support>
313
		<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
314
		<ds:SignedInfo>
315
		<ds:CanonicalizationMethod Algorithm="http://parallels.com/schemas/keys/core/3#canonicalize"/>
316
		<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
317
		<ds:Reference URI="">
318
		<ds:Transforms>
319
		<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
320
		<ds:Transform Algorithm="http://parallels.com/schemas/keys/core/3#transform"/>
321
		</ds:Transforms>
322
		<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
323
		<ds:DigestValue>ENCODED HASH HERE</ds:DigestValue>
324
		</ds:Reference>
325
		</ds:SignedInfo>
326
		<ds:SignatureValue>
327
		ENCODED DATA HERE
328
		</ds:SignatureValue>
329
		<ds:KeyInfo>
330
		<ds:X509Data>
331
		<ds:X509Certificate>
332
		ENCODED DATA HERE
333
		</ds:X509Certificate>
334
		</ds:X509Data>
335
		</ds:KeyInfo>
336
		</ds:Signature>
337
		</plesk-windows:key>
338
339
		[xmlrpc_type] => base64
340
		)
341
342
		)
343
344
		*/
345
	}
346
347
	/**
348
	 * Returns an array with keys 'resultCode', 'resultDesc', and 'upgradePlans'.  the last one being an array of plan names, one time i wrote down the output it looked like:
349
	 * 3_LANGUAGE_PACKS FOTOLIA_OFF 5_LANGUAGE_PACKS  NEWSFEED_OFF VIRTUOZZO_PROMO_OFF ADDITIONAL_LANGUAGE_PACK were some of the packqage types, there wer eothers
350
	 *
351
	 * @param $key
352
	 * @return mixed
353
	 */
354
	public function getAvailableUpgrades($key) {
355
		$this->response = $this->xml->__call('partner10.getAvailableUpgrades', [$this->authInfo(), $key]);
356
		return $this->response;
357
	}
358
359
	/**
360
	 * Success
361
	 * Array
362
	 * (
363
	 * [keyInfo] => Array
364
	 * (
365
	 * [expirationDate] => stdClass Object
366
	 * (
367
	 * [scalar] => 20131202T00:00:00
368
	 * [xmlrpc_type] => datetime
369
	 * [timestamp] => 1385942400
370
	 * )
371
	 * )
372
	 * [features] => Array
373
	 * (
374
	 * [0] => Array
375
	 * (
376
	 * [apiName] => PLESK_7X_FOR_WIN_POWER_PACK
377
	 * [name] => Parallels PowerPack for Plesk (Windows) (Monthly Lease)
378
	 * )
379
	 * [1] => Array
380
	 * (
381
	 * [apiName] => PLESK-100-SITES
382
	 * [name] => Parallels Web Presence Builder - 100 Sites (Monthly Lease)
383
	 * )
384
	 * [2] => Array
385
	 * (
386
	 * [apiName] => UNLIMITED_DOMAINS
387
	 * [name] => Unlimited Domains w/1 yr SUS (Lease)
388
	 * )
389
	 * )
390
	 * [billingType] => LEASE
391
	 * [productFamily] => plesk
392
	 * [createDate] => stdClass Object
393
	 * (
394
	 * [scalar] => 20131023T18:02:11
395
	 * [xmlrpc_type] => datetime
396
	 * [timestamp] => 1382551331
397
	 * )
398
	 * [trial] =>
399
	 * [lastReportingDate] => stdClass Object
400
	 * (
401
	 * [scalar] => 20131029T06:27:31
402
	 * [xmlrpc_type] => datetime
403
	 * [timestamp] => 1383028051
404
	 * )
405
	 * [additionalKeys] => Array
406
	 * (
407
	 * [0] => Array
408
	 * (
409
	 * [expirationDate] => stdClass Object
410
	 * (
411
	 * [scalar] => 20131202T00:00:00
412
	 * [xmlrpc_type] => datetime
413
	 * [timestamp] => 1385942400
414
	 * )
415
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
416
	 * [apiKeyType] => N/A
417
	 * [boundIPAddress] =>
418
	 * [problem] =>
419
	 * [keyNumber] => KAV.00005821.0001
420
	 * [properties] => Array
421
	 * (
422
	 * )
423
	 * [type] => ADDITIONAL
424
	 * [updateDate] => stdClass Object
425
	 * (
426
	 * [scalar] => 20131122T00:00:00
427
	 * [xmlrpc_type] => datetime
428
	 * [timestamp] => 1385078400
429
	 * )
430
	 * [clientId] => 19282468
431
	 * [parentKeyNumber] => PLSK.00005819.0000
432
	 * [lastReportingVersion] => 11.5.3
433
	 * [keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
434
	 * [terminated] =>
435
	 * [susAndSupportInfo] => Array
436
	 * (
437
	 * )
438
	 * [features] => Array
439
	 * (
440
	 * )
441
	 * [billingType] => LEASE
442
	 * [productFamily] => kav
443
	 * [createDate] => stdClass Object
444
	 * (
445
	 * [scalar] => 20131023T18:02:12
446
	 * [xmlrpc_type] => datetime
447
	 * [timestamp] => 1382551332
448
	 * )
449
	 * [trial] =>
450
	 * [lastReportingDate] => stdClass Object
451
	 * (
452
	 * [scalar] => 20131023T18:05:24
453
	 * [xmlrpc_type] => datetime
454
	 * [timestamp] => 1382551524
455
	 * )
456
	 * [additionalKeys] => Array
457
	 * (
458
	 * )
459
	 * )
460
	 * [1] => Array
461
	 * (
462
	 * [expirationDate] => stdClass Object
463
	 * (
464
	 * [scalar] => 20131202T00:00:00
465
	 * [xmlrpc_type] => datetime
466
	 * [timestamp] => 1385942400
467
	 * )
468
	 * [lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
469
	 * [apiKeyType] => N/A
470
	 * [boundIPAddress] =>
471
	 * [problem] =>
472
	 * [keyNumber] => APS.00005820.0001
473
	 * [properties] => Array
474
	 * (
475
	 * )
476
	 * [type] => ADDITIONAL
477
	 * [updateDate] => stdClass Object
478
	 * (
479
	 * [scalar] => 20131122T00:00:00
480
	 * [xmlrpc_type] => datetime
481
	 * [timestamp] => 1385078400
482
	 * )
483
	 * [clientId] => 19282468
484
	 * [parentKeyNumber] => PLSK.00005819.0000
485
	 * [lastReportingVersion] => 11.5.3
486
	 * [keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
487
	 * [terminated] =>
488
	 * [susAndSupportInfo] => Array
489
	 * (
490
	 * )
491
	 * [features] => Array
492
	 * (
493
	 * )
494
	 * [billingType] => LEASE
495
	 * [productFamily] => unity-one
496
	 * [createDate] => stdClass Object
497
	 * (
498
	 * [scalar] => 20131023T18:02:11
499
	 * [xmlrpc_type] => datetime
500
	 * [timestamp] => 1382551331
501
	 * )
502
	 * [trial] =>
503
	 * [lastReportingDate] => stdClass Object
504
	 * (
505
	 * [scalar] => 20131023T18:05:26
506
	 * [xmlrpc_type] => datetime
507
	 * [timestamp] => 1382551526
508
	 * )
509
	 * [additionalKeys] => Array
510
	 * (
511
	 * )
512
	 * )
513
	 * )
514
	 * )
515
	 *[resultCode] => 100
516
	 * [resultDesc] => Key info for PLSK.00005819.0000 key returned successfully
517
	 * [keyNumber] => PLSK.00005819.0000
518
	 * )
519
	 *
520
	 * @param $key
521
	 * @return mixed
522
	 */
523
	public function getKeyInfo($key) {
524
		$this->response = $this->xml->__call('partner10.getKeyInfo', [$this->authInfo(), $key]);
525
		return $this->response;
526
	}
527
528
	/**
529
	 * @param string $ipAddress the ip address
530
	 * @return false|string false if no key , or a string w/ the key
531
	 */
532
	public function getMainKeyFromIp($ipAddress) {
533
		$response = $this->getKeyNumbers($ipAddress);
534
		//$response = $this->getKeysInfoByIP($ipAddress);
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
535
		$return = FALSE;
536
		if (isset($response['keyInfos'])) {
537
			$responseValues = array_values($response['keyInfos']);
538
			foreach ($responseValues as $data) {
539
				if ($return === FALSE)
540
					$return = $data['keyNumber'];
541
				if ($data['type'] == 'MAIN')
542
					$return = $data['keyNumber'];
543
			}
544
			return $return;
545
		} else
546
			return FALSE;
547
	}
548
549
	/**
550
	 * @param $ipAddress
551
	 * @return mixed
552
	 */
553
	public function getKeysInfoByIP($ipAddress) {
554
		$this->response = $this->xml->__call('partner10.getKeysInfoByIP', [$this->authInfo(), $ipAddress]);
555
		return $this->response;
556
	}
557
558
	/**
559
	 * @param array|string $ips
560
	 * @param array        $macs
561
	 * @return mixed
562
	 */
563
	public function getKeyNumbers($ips = [], $macs = []) {
564
		myadmin_log('licenses', 'info', json_encode($this->serverAddress($ips, $macs)), __LINE__, __FILE__);
0 ignored issues
show
Bug introduced by
It seems like $ips defined by parameter $ips on line 563 can also be of type string; however, Detain\Parallels\Parallels::serverAddress() does only seem to accept array, maybe add an additional type check?

This check looks at variables that have been passed in as parameters and are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
565
		$this->response = $this->xml->__call('partner10.getKeyNumbers', [$this->authInfo(), $this->serverAddress($ips, $macs)]);
0 ignored issues
show
Bug introduced by
It seems like $ips defined by parameter $ips on line 563 can also be of type string; however, Detain\Parallels\Parallels::serverAddress() does only seem to accept array, maybe add an additional type check?

This check looks at variables that have been passed in as parameters and are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
566
		return $this->response;
567
		/* Success
0 ignored issues
show
Unused Code Comprehensibility introduced by
47% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
568
		Array
569
		(
570
		[keyInfos] => Array
571
		(
572
		[0] => Array
573
		(
574
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows for Virtual Machines (Lease)
575
		Lease)
576
		[lastReportingIp] => 206.72.205.242
577
		[terminated] => 1
578
		[keyNumber] => KAV.00004873.0002
579
		[billingType] => LEASE
580
		[type] => ADDITIONAL
581
		[createDate] => stdClass Object
582
		(
583
		[scalar] => 20131014T16:44:40
584
		[xmlrpc_type] => datetime
585
		[timestamp] => 1381769080
586
		)
587
588
		[lastReportingDate] => stdClass Object
589
		(
590
		[scalar] => 20131023T17:35:45
591
		[xmlrpc_type] => datetime
592
		[timestamp] => 1382549745
593
		)
594
595
		)
596
597
		[3] => Array
598
		(
599
		[keyType] => Parallels Plesk Panel 10.x/11.x and Later for Windows (Lease)
600
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
601
		[terminated] =>
602
		[keyNumber] => PLSK.00005819.0000
603
		[billingType] => LEASE
604
		[type] => MAIN
605
		[createDate] => stdClass Object
606
		(
607
		[scalar] => 20131023T18:02:11
608
		[xmlrpc_type] => datetime
609
		[timestamp] => 1382551331
610
		)
611
612
		[lastReportingDate] => stdClass Object
613
		(
614
		[scalar] => 20131029T06:27:31
615
		[xmlrpc_type] => datetime
616
		[timestamp] => 1383028051
617
		)
618
619
		)
620
621
		[4] => Array
622
		(
623
		[keyType] => UNITY One, 2 Domains (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
624
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
625
		[terminated] =>
626
		[keyNumber] => APS.00005820.0001
627
		[billingType] => LEASE
628
		[type] => ADDITIONAL
629
		[createDate] => stdClass Object
630
		(
631
		[scalar] => 20131023T18:02:11
632
		[xmlrpc_type] => datetime
633
		[timestamp] => 1382551331
634
		)
635
636
		[lastReportingDate] => stdClass Object
637
		(
638
		[scalar] => 20131023T18:05:26
639
		[xmlrpc_type] => datetime
640
		[timestamp] => 1382551526
641
		)
642
643
		)
644
645
		[5] => Array
646
		(
647
		[keyType] => Parallels Plesk Panel Antivirus Powered by Kaspersky, 5 Mailboxes (Parallels PowerPack for Plesk) (Windows) (Monthly Lease)
648
		[lastReportingIp] => 206.72.205.242, 206.72.205.243, 206.72.205.244, 206.72.205.245, 206.72.205.246
649
		[terminated] =>
650
		[keyNumber] => KAV.00005821.0001
651
		[billingType] => LEASE
652
		[type] => ADDITIONAL
653
		[createDate] => stdClass Object
654
		(
655
		[scalar] => 20131023T18:02:12
656
		[xmlrpc_type] => datetime
657
		[timestamp] => 1382551332
658
		)
659
660
		[lastReportingDate] => stdClass Object
661
		(
662
		[scalar] => 20131023T18:05:24
663
		[xmlrpc_type] => datetime
664
		[timestamp] => 1382551524
665
		)
666
667
		)
668
669
		)
670
671
		[resultCode] => 100
672
		[resultDesc] => Found: PLSK.02554871.0001, APS.02554872.0002, KAV.02554873.0002, PLSK.00005819.0000, APS.00005820.0001, KAV.00005821.0001
673
		[keyNumbers] => Array
674
		(
675
		[0] => PLSK.02554871.0001
676
		[1] => APS.02554872.0002
677
		[2] => KAV.02554873.0002
678
		[3] => PLSK.00005819.0000
679
		[4] => APS.00005820.0001
680
		[5] => KAV.00005821.0001
681
		)
682
683
		[detailResultCode] => 0
684
		)
685
		*/
686
	}
687
688
	/**
689
	 * @param bool $client
690
	 * @return mixed
691
	 */
692
	public function getAvailableKeyTypesAndFeatures($client = FALSE) {
693
		$this->response = $this->xml->__call('partner10.getAvailableKeyTypesAndFeatures', [$this->authInfo(), $client === FALSE ? $this->client : $client]);
694
		return $this->response;
695
		/* My Output:
0 ignored issues
show
Unused Code Comprehensibility introduced by
42% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
696
		Array
697
		(
698
		[resultCode] => 100
699
		[features] => Array
700
		(
701
		[0] => ADDON-CT-OAS-L-1Y
702
		[1] => ADDON-HMP-L-M
703
		[2] => SB10X-500
704
		[3] => ADDON-WPB-12500-M
705
		[4] => MEDIUM
706
		[5] => 30_DOMAINS_FOR_VZ
707
		[6] => PLESK-100-SITES
708
		[7] => SB10X-35000
709
		[8] => STORE_BUTTON_OFF
710
		[9] => 2CPU_90CT_PIM
711
		[10] => 4CPU_1CT_PIM
712
		[11] => SB10X-300
713
		[12] => SB10X-25000
714
		[13] => 3_LANGUAGE_PACKS_FOR_VMM
715
		[14] => UNLIMITED_DOMAINS_1000_BILLING_ACCOUNTS_100_SITES_FOR_VZ
716
		[15] => 8CPU_15HV_PVA
717
		[16] => ADDITIONAL_LANGUAGE_PACK
718
		[17] => SB10X-100
719
		[18] => 4CPU_UNLIMITEDVC_PVA
720
		[19] => PLESK_SWSOFT_SERVICES_OFF
721
		[20] => 8CPU_100CT_PVA
722
		[21] => PLESK_POWER_PACK_FOR_VMM
723
		[22] => 4CPU_20CT_PIM
724
		[23] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VMM
725
		[24] => HSPHERE_7500_ACCOUNTS
726
		[25] => CLDF-PLUS-M
727
		[26] => 7500_SITES_MULTI_SERVER
728
		[27] => 4-LANGUAGE-PACKS-FOR-PPA
729
		[28] => MONTHLY_AMPS
730
		[29] => 300_SITES
731
		[30] => UO-UNL-L-1Y
732
		[31] => 2CPU_20CT_PIM
733
		[32] => 8CPU_6HV_PVA
734
		[33] => 4_LANGUAGE_PACKS
735
		[34] => 8CPU_40CT_PVA
736
		[35] => 8CPU_1CT_PVA
737
		[36] => 2CPU_4HV_PVA
738
		[37] => 8CPU_200CT_PVA
739
		[38] => 4CPU_60CT_PIM
740
		[39] => 100_EXT_WHITELABEL
741
		[40] => 8CPU_50CT_PVA
742
		[41] => PLESK-UNLIMITED-PB-ACCOUNTS
743
		[42] => SB10X-40000
744
		[43] => PLESK_HOSTING_SUITE_FOR_VZ
745
		[44] => HSPHERE_3750_ACCOUNTS
746
		[45] => 2CPU_7HV_PVA
747
		[46] => 4CPU_5CT_PIM
748
		[47] => UNLIMITED_USERS_FOR_VPS
749
		[48] => PLESK-100-SITES-FOR-VZ
750
		[49] => PLESK_RELOADED_FOR_VZ_POWER_PACK
751
		[50] => 8CPU_10HV_PVA
752
		[51] => ADDONVZ-CT-OAS-L-1Y
753
		[52] => PLESK_7X_FOR_WIN_FOR_VZ_POWER_PACK
754
		[53] => SB10X-2500
755
		[54] => 2CPU_3CT_PIM
756
		[55] => ADDITIONAL_LANGUAGE_PACK_FOR_VZ
757
		[56] => 8CPU_80CT_PVA
758
		[57] => 4CPU_30VC_PVA
759
		[58] => 1000_SITES_MULTI_SERVER
760
		[59] => 1_UNITY_MOBILE_SITE
761
		[60] => 2CPU_40CT_PIM
762
		[61] => EXTRAS_BUTTONS_OFF
763
		[62] => UNLIMITED_DOMAINS_FOR_VMM
764
		[63] => 8CPU_450CT_PVA
765
		[64] => HSPHERE_500_ACCOUNTS
766
		[65] => 4CPU_5VC_PVA
767
		[66] => HSPHERE_1750_ACCOUNTS
768
		[67] => FOTOLIA_OFF
769
		[68] => SB10X-50000
770
		[69] => HSPHERE_1000_ACCOUNTS
771
		[70] => 1000_EXT
772
		[71] => SB10X-7500
773
		[72] => 100_EXTENSIONS
774
		[73] => 2CPU_1CT_PIM
775
		[74] => 1000_EXT_WHITELABEL
776
		[75] => 8CPU_9HV_PVA
777
		[76] => UO-1-L-1Y
778
		[77] => 8CPU_5VC_PVA
779
		[78] => 8CPU_8HV_PVA
780
		[79] => 4_LANGUAGE_PACKS_FOR_VZ
781
		[80] => 4CPU_70CT_PIM
782
		[81] => 30_DOMAINS
783
		[82] => 2_LANGUAGE_PACKS_FOR_VMM
784
		[83] => ADDON-CT-OAS-L-M
785
		[84] => UO-1-W-M
786
		[85] => UNLIMITED-LANGUAGE-PACKS-FOR-PPA
787
		[86] => 100_DOMAINS_FOR_VZ
788
		[87] => ADDON-WPB-1000-M
789
		[88] => STH-WMP-BUSP-M
790
		[89] => UNLIMITED_DOMAINS
791
		[90] => 2CPU_100CT_PIM
792
		[91] => ADDONVZ-HMP-W-M
793
		[92] => DISABLE_SITEBUILDER
794
		[93] => 8CPU_1CT
795
		[94] => HSPHERE_2500_ACCOUNTS
796
		[95] => STH-WMP-BUS-M
797
		[96] => PLESK_POWER_PACK_FOR_WIN
798
		[97] => 8CPU_30VC_PVA
799
		[98] => 8CPU_150CT_PVA
800
		[99] => HSPHERE_5000_ACCOUNTS
801
		[100] => 4CPU_90CT_PIM
802
		[101] => PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VZ
803
		[102] => ADDON-WPB-45000-M
804
		[103] => PLESK_POWER_PACK_FOR_VZ
805
		[104] => 8CPU_250CT_PVA
806
		[105] => 1-LANGUAGE-PACK-FOR-PPA
807
		[106] => UO-UNL-W-M
808
		[107] => 2CPU_5VC_PVA
809
		[108] => ADDON-WPB-15000-M
810
		[109] => PLESK_RELOADED_POWER_PACK
811
		[110] => ADDON-WPB-7500-M
812
		[111] => PLESK-1000-SITES-FOR-VZ
813
		[112] => 10_UNITY_MOBILE_SITES
814
		[148] => 3_LANGUAGE_PACKS_FOR_VZ
815
		[149] => 2CPU_30CT_PIM
816
		[150] => ENTERPRISE
817
		[151] => 2CPU_50CT_PIM
818
		[152] => ADDON-HMP-W-M
819
		[153] => 2_LANGUAGE_PACKS_FOR_VZ
820
		[154] => 4_LANGUAGE_PACKS_FOR_VMM
821
		[155] => UO-UNL-L-M
822
		[156] => SB10X-12500
823
		[157] => 4CPU_50CT_PIM
824
		[158] => ADDON-WPB-20000-M
825
		[159] => HSPHERE_10000_ACCOUNTS
826
		[160] => 4CPU_3CT_PIM
827
		[161] => 3_LANGUAGE_PACKS
828
		[162] => 8CPU_90CT_PVA
829
		[163] => 5000_SITES
830
		[164] => 100_SITES
831
		[165] => PLESK_POWER_PACK
832
		[166] => 8CPU_400CT_PVA
833
		[167] => 500_EXT
834
		[168] => 5000_SITES_MULTI_SERVER
835
		[169] => 5_LANGUAGE_PACKS_FOR_VMM
836
		[170] => UNLIMITED_BATTLEFIELD_SERVERS
837
		[171] => ADDON-WPB-35000-M
838
		[172] => PLESK-100-SITES-FOR-VMM
839
		[173] => ADDON-WPB-50000-M
840
		[174] => 8CPU_4HV_PVA
841
		[175] => 8CPU_5HV_PVA
842
		[176] => 2CPU_10HV_PVA
843
		[177] => ADDON-WPB-300-M
844
		[178] => 2CPU_2HV_PVA
845
		[179] => 300_SITES_MULTI_SERVER
846
		[180] => 10_DOMAINS_FOR_VZ
847
		[181] => 1_LANGUAGE_PACK
848
		[182] => 4CPU_10CT_PIM
849
		[183] => ADDON-WPB-700-M
850
		[184] => 2CPU_30VC_PVA
851
		[185] => 2CPU_1HV_PVA
852
		[186] => 5_USERS_FOR_VPS
853
		[187] => 2CPU_10CT_PIM
854
		[188] => 500_SITES_MULTI_SERVER
855
		[189] => 300_DOMAINS
856
		[190] => 10000_SITES
857
		[191] => 8CPU_2HV_PVA
858
		[192] => ADDON-WPB-10000-M
859
		[193] => PLESK_POWER_PACK_FOR_WIN_FOR_VMM
860
		[194] => PLESK-1000-SITES-FOR-VMM
861
		[195] => 5_LANGUAGE_PACKS
862
		[196] => 1_LANGUAGE_PACK_FOR_VZ
863
		[197] => 2CPU_200CT_PIM
864
		[198] => VIRTUOZZO_PROMO_OFF
865
		[199] => SB10X-5000
866
		[200] => 8CPU_7HV_PVA
867
		[201] => 10_DOMAINS
868
		[202] => PRO
869
		[203] => 500_SITES
870
		[204] => 2CPU_70CT_PIM
871
		[205] => 1_BATTLEFIELD_SERVER
872
		[206] => 2CPU_150CT_PIM
873
		[207] => 2CPU_80CT_PIM
874
		[208] => ADDONVMM-HMP-L-M
875
		[209] => UNLIMITED_USERS
876
		[210] => 4CPU_30CT_PIM
877
		[211] => PLESK_POWER_PACK_FOR_WIN_FOR_VZ
878
		[212] => 8CPU_300CT_PVA
879
		[213] => 5_USERS
880
		[214] => 4CPU_150CT_PIM
881
		[215] => 10_BATTLEFIELD_SERVERS
882
		[216] => ADDON-WPB-100-M
883
		[217] => 8CPU_3HV_PVA
884
		[218] => ADDON-WPB-2500-M
885
		[219] => 5_LANGUAGE_PACKS_FOR_VZ
886
		[220] => 5_BATTLEFIELD_SERVERS
887
		[221] => DISABLE_GOOGLE_TOOLS
888
		[222] => 500_EXT_WHITELABEL
889
		[223] => UNLIMITED_DOMAINS_FOR_VZ
890
		[224] => SB10X-15000
891
		[225] => UNLIMITED_MAILBOXES_FOR_VZ
892
		[226] => 2CPU_5HV_PVA
893
		[227] => PLESK_7X_FOR_WIN_POWER_PACK
894
		[228] => PLESK-1000-SITES
895
		[229] => DISABLE_FEATURE_UPGRADES
896
		[230] => SB10X-20000
897
		[231] => ENTRY
898
		[232] => 2CPU_6HV_PVA
899
		[233] => 8CPU_30CT_PVA
900
		[234] => UO-UNL-W-1Y
901
		[235] => 2_LANGUAGE_PACKS
902
		[236] => 8CPU_UNLIMITEDVC_PVA
903
		[237] => 100_DOMAINS
904
		[238] => 8CPU_20CT_PVA
905
		[239] => 2CPU_3HV_PVA
906
		[240] => ADD_1_MANAGED_MSSQL
907
		[241] => 100_EXT
908
		[242] => 100_EXTENSIONS_FOR_VZ
909
		[243] => ADDON-WPB-500-M
910
		[244] => 8CPU_3CT_PVA
911
		[245] => 2CPU_9HV_PVA
912
		[246] => 1_LANGUAGE_PACK_FOR_VMM
913
		[247] => 8CPU_10CT_PVA
914
		[248] => 2CPU_15HV_PVA
915
		[249] => 2CPU_8HV_PVA
916
		[250] => STARTER
917
		[251] => ADDONVMM-HMP-W-M
918
		[252] => 7500_SITES
919
		[253] => 4CPU_40CT_PIM
920
		[254] => SB10X-30000
921
		[255] => PROFESSIONAL
922
		[256] => 1000_SITES
923
		[257] => 8CPU_350CT_PVA
924
		[258] => 2CPU_60CT_PIM
925
		[259] => HSPHERE_200_ACCOUNTS
926
		[260] => 8CPU_500CT_PVA
927
		[261] => SB10X-10000
928
		[262] => STH-WMP-BSC-M
929
		[263] => ADDON-WPB-25000-M
930
		)
931
932
		[resultDesc] => Key types available: GLOBAL_MENTORING_LIVE_EXPERT_STANDARD_CARE, PSBM_45_SPE, PLESK-10-AND-LATER-FOR-VMM, PLESK_ANTIVIRUS_BY_KAV_FOR_WIN_FOR_VZ, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-M, MYLITTLEADMIN_2000, MYLITTLEADMIN_2005, PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN, CRT-5-UNL-L, GLOBAL_MENTORING_TOTAL_CARE, LINUXMAGIC_MAGICSPAM, PLESK_ANTIVIRUS_BY_KAV_FOR_VZ, PINNACLE_CART_ECOMMERCE_SHOPPING_CART, SYMANTEC_NORTON_INTERNET_SECURITY_10SEATS_MONTHLY, ATI_PRO_FOR_WIN, STOPTHEHACKER-M, PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN_FOR_VZ, SB10X-PA, ATI_PRO, CRT-30-UNL-L, 4PSA_VOIPNOW_25_PROFESSIONAL, CLOUDLINUX-L-M, ATMAIL_WEBMAIL, PLESK_10_AND_LATER_FOR_WIN, CRT-5-100-L, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-1Y, UNITY-ONE-W-M, PLESK-10-AND-LATER-FOR-WIN-FOR-VMM, GLOBAL_MENTORING_LIVE_EXPERT_BASIC, CRT-50-UNL-L, VIRTUOZZO_CONTAINERS_4, PARALLELS_PREMIUM_ANTIVIRUS_FOR_VZ, PLESK_10_AND_LATER_FOR_VZ, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-M, CRT-50-100-L, UNITY-ONE-L-M, PLESK_ANTIVIRUS_BY_DRWEB, SYMANTEC_NORTON_INTERNET_SECURITY_MONTHLY, CRT-100-UNL-L, PARALLELS-CLOUD-SERVER, PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-1Y, CRT-100-100-L, PLESK_10_AND_LATER_FOR_WIN_FOR_VZ, PPA-L-M, PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN, PARALLELS-PREMIUM-ANTIVIRUS-FOR-VMM, PLESK_ANTIVIRUS_BY_KAV_FOR_WIN, PLESK_ANTIVIRUS_BY_DRWEB_FOR_VZ, SYMANTEC_NORTON_INTERNET_SECURITY_5SEATS_MONTHLY, UNITY_MOBILE, PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN_FOR_VZ, SB10X, UNITY_MOBILE_FOR_WIN, PARALLELS-CLOUD-STORAGE, CRT-30-100-L, CLOUDFLARE-M, VIRTUOZZO_CONTAINERS_4_FOR_WIN, PLESK_10_AND_LATER, PARALLELS_PREMIUM_ANTIVIRUS, SYMANTEC_NORTON_INTERNET_SECURITY_3SEATS_MONTHLY, PLESK_ANTIVIRUS_BY_KAV, KEEPIT_ONLINE_BACKUP. Features available: ADDON-CT-OAS-L-1Y, ADDON-HMP-L-M, SB10X-500, ADDON-WPB-12500-M, MEDIUM, 30_DOMAINS_FOR_VZ, PLESK-100-SITES, SB10X-35000, STORE_BUTTON_OFF, 2CPU_90CT_PIM, 4CPU_1CT_PIM, SB10X-300, SB10X-25000, 3_LANGUAGE_PACKS_FOR_VMM, UNLIMITED_DOMAINS_1000_BILLING_ACCOUNTS_100_SITES_FOR_VZ, 8CPU_15HV_PVA, ADDITIONAL_LANGUAGE_PACK, SB10X-100, 4CPU_UNLIMITEDVC_PVA, PLESK_SWSOFT_SERVICES_OFF, 8CPU_100CT_PVA, PLESK_POWER_PACK_FOR_VMM, 4CPU_20CT_PIM, PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VMM, HSPHERE_7500_ACCOUNTS, CLDF-PLUS-M, 7500_SITES_MULTI_SERVER, 4-LANGUAGE-PACKS-FOR-PPA, MONTHLY_AMPS, 300_SITES, UO-UNL-L-1Y, 2CPU_20CT_PIM, 8CPU_6HV_PVA, 4_LANGUAGE_PACKS, 8CPU_40CT_PVA, 8CPU_1CT_PVA, 2CPU_4HV_PVA, 8CPU_200CT_PVA, 4CPU_60CT_PIM, 100_EXT_WHITELABEL, 8CPU_50CT_PVA, PLESK-UNLIMITED-PB-ACCOUNTS, SB10X-40000, PLESK_HOSTING_SUITE_FOR_VZ, HSPHERE_3750_ACCOUNTS, 2CPU_7HV_PVA, 4CPU_5CT_PIM, UNLIMITED_USERS_FOR_VPS, PLESK-100-SITES-FOR-VZ, PLESK_RELOADED_FOR_VZ_POWER_PACK, 8CPU_10HV_PVA, ADDONVZ-CT-OAS-L-1Y, PLESK_7X_FOR_WIN_FOR_VZ_POWER_PACK, SB10X-2500, 2CPU_3CT_PIM, ADDITIONAL_LANGUAGE_PACK_FOR_VZ, 8CPU_80CT_PVA, 4CPU_30VC_PVA, 1000_SITES_MULTI_SERVER, 1_UNITY_MOBILE_SITE, 2CPU_40CT_PIM, EXTRAS_BUTTONS_OFF, UNLIMITED_DOMAINS_FOR_VMM, 8CPU_450CT_PVA, HSPHERE_500_ACCOUNTS, 4CPU_5VC_PVA, HSPHERE_1750_ACCOUNTS, FOTOLIA_OFF, SB10X-50000, HSPHERE_1000_ACCOUNTS, 1000_EXT, SB10X-7500, 100_EXTENSIONS, 2CPU_1CT_PIM, 1000_EXT_WHITELABEL, 8CPU_9HV_PVA, UO-1-L-1Y, 8CPU_5VC_PVA, 8CPU_8HV_PVA, 4_LANGUAGE_PACKS_FOR_VZ, 4CPU_70CT_PIM, 30_DOMAINS, 2_LANGUAGE_PACKS_FOR_VMM, ADDON-CT-OAS-L-M, UO-1-W-M, UNLIMITED-LANGUAGE-PACKS-FOR-PPA, 100_DOMAINS_FOR_VZ, ADDON-WPB-1000-M, STH-WMP-BUSP-M, UNLIMITED_DOMAINS, 2CPU_100CT_PIM, ADDONVZ-HMP-W-M, DISABLE_SITEBUILDER, 8CPU_1CT, HSPHERE_2500_ACCOUNTS, STH-WMP-BUS-M, PLESK_POWER_PACK_FOR_WIN, 8CPU_30VC_PVA, 8CPU_150CT_PVA, HSPHERE_5000_ACCOUNTS, 4CPU_90CT_PIM, PLESK-UNLIMITED-PB-ACCOUNTS-FOR-VZ, ADDON-WPB-45000-M, PLESK_POWER_PACK_FOR_VZ, 8CPU_250CT_PVA, 1-LANGUAGE-PACK-FOR-PPA, UO-UNL-W-M, 2CPU_5VC_PVA, ADDON-WPB-15000-M, PLESK_RELOADED_POWER_PACK, ADDON-WPB-7500-M, PLESK-1000-SITES-FOR-VZ, 10_UNITY_MOBILE_SITES, 8CPU_70CT_PVA, UNLIMITED_MAILBOXES, STH-WMP-PRO-M, SB10X-45000, 8CPU_1HV_PVA, NEWSFEED_OFF, 4CPU_80CT_PIM, UO-1-W-1Y, 10000_SITES_MULTI_SERVER, 8CPU_UNLIMITEDHV_PVA, 2_BATTLEFIELD_SERVERS, CLNX-M, 8CPU_60CT_PVA, 100_SITES_MULTI_SERVER, 2CPU_UNLIMITEDVC_PVA, 2CPU_UNLIMITED_HV_PVA, 10_EXT_WHITELABEL, REINSTATE_SUS, ADDONVZ-HMP-L-M, UO-1-L-M, 8CPU_5CT_PVA, 4CPU_100CT_PIM, SB10X-1000, ADDON-WPB-5000-M, 2CPU_5CT_PIM, 10_EXT, 5_UNITY_MOBILE_SITES, 4CPU_200CT_PIM, ADDON-WPB-40000-M, ADDON-WPB-30000-M, 5-LANGUAGE-PACKS-FOR-PPA, 3-LANGUAGE-PACKS-FOR-PPA, PCS-RKU, ADDONVZ-CT-OAS-L-M, 2-LANGUAGE-PACKS-FOR-PPA, 3_LANGUAGE_PACKS_FOR_VZ, 2CPU_30CT_PIM, ENTERPRISE, 2CPU_50CT_PIM, ADDON-HMP-W-M, 2_LANGUAGE_PACKS_FOR_VZ, 4_LANGUAGE_PACKS_FOR_VMM, UO-UNL-L-M, SB10X-12500, 4CPU_50CT_PIM, ADDON-WPB-20000-M, HSPHERE_10000_ACCOUNTS, 4CPU_3CT_PIM, 3_LANGUAGE_PACKS, 8CPU_90CT_PVA, 5000_SITES, 100_SITES, PLESK_POWER_PACK, 8CPU_400CT_PVA, 500_EXT, 5000_SITES_MULTI_SERVER, 5_LANGUAGE_PACKS_FOR_VMM, UNLIMITED_BATTLEFIELD_SERVERS, ADDON-WPB-35000-M, PLESK-100-SITES-FOR-VMM, ADDON-WPB-50000-M, 8CPU_4HV_PVA, 8CPU_5HV_PVA, 2CPU_10HV_PVA, ADDON-WPB-300-M, 2CPU_2HV_PVA, 300_SITES_MULTI_SERVER, 10_DOMAINS_FOR_VZ, 1_LANGUAGE_PACK, 4CPU_10CT_PIM, ADDON-WPB-700-M, 2CPU_30VC_PVA, 2CPU_1HV_PVA, 5_USERS_FOR_VPS, 2CPU_10CT_PIM, 500_SITES_MULTI_SERVER, 300_DOMAINS, 10000_SITES, 8CPU_2HV_PVA, ADDON-WPB-10000-M, PLESK_POWER_PACK_FOR_WIN_FOR_VMM, PLESK-1000-SITES-FOR-VMM, 5_LANGUAGE_PACKS, 1_LANGUAGE_PACK_FOR_VZ, 2CPU_200CT_PIM, VIRTUOZZO_PROMO_OFF, SB10X-5000, 8CPU_7HV_PVA, 10_DOMAINS, PRO, 500_SITES, 2CPU_70CT_PIM, 1_BATTLEFIELD_SERVER, 2CPU_150CT_PIM, 2CPU_80CT_PIM, ADDONVMM-HMP-L-M, UNLIMITED_USERS, 4CPU_30CT_PIM, PLESK_POWER_PACK_FOR_WIN_FOR_VZ, 8CPU_300CT_PVA, 5_USERS, 4CPU_150CT_PIM, 10_BATTLEFIELD_SERVERS, ADDON-WPB-100-M, 8CPU_3HV_PVA, ADDON-WPB-2500-M, 5_LANGUAGE_PACKS_FOR_VZ, 5_BATTLEFIELD_SERVERS, DISABLE_GOOGLE_TOOLS, 500_EXT_WHITELABEL, UNLIMITED_DOMAINS_FOR_VZ, SB10X-15000, UNLIMITED_MAILBOXES_FOR_VZ, 2CPU_5HV_PVA, PLESK_7X_FOR_WIN_POWER_PACK, PLESK-1000-SITES, DISABLE_FEATURE_UPGRADES, SB10X-20000, ENTRY, 2CPU_6HV_PVA, 8CPU_30CT_PVA, UO-UNL-W-1Y, 2_LANGUAGE_PACKS, 8CPU_UNLIMITEDVC_PVA, 100_DOMAINS, 8CPU_20CT_PVA, 2CPU_3HV_PVA, ADD_1_MANAGED_MSSQL, 100_EXT, 100_EXTENSIONS_FOR_VZ, ADDON-WPB-500-M, 8CPU_3CT_PVA, 2CPU_9HV_PVA, 1_LANGUAGE_PACK_FOR_VMM, 8CPU_10CT_PVA, 2CPU_15HV_PVA, 2CPU_8HV_PVA, STARTER, ADDONVMM-HMP-W-M, 7500_SITES, 4CPU_40CT_PIM, SB10X-30000, PROFESSIONAL, 1000_SITES, 8CPU_350CT_PVA, 2CPU_60CT_PIM, HSPHERE_200_ACCOUNTS, 8CPU_500CT_PVA, SB10X-10000, STH-WMP-BSC-M, ADDON-WPB-25000-M.
933
		[keyTypes] => Array
934
		(
935
		[0] => GLOBAL_MENTORING_LIVE_EXPERT_STANDARD_CARE
936
		[1] => PSBM_45_SPE
937
		[2] => PLESK-10-AND-LATER-FOR-VMM
938
		[3] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN_FOR_VZ
939
		[4] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-M
940
		[5] => MYLITTLEADMIN_2000
941
		[6] => MYLITTLEADMIN_2005
942
		[7] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN
943
		[8] => CRT-5-UNL-L
944
		[9] => GLOBAL_MENTORING_TOTAL_CARE
945
		[10] => LINUXMAGIC_MAGICSPAM
946
		[11] => PLESK_ANTIVIRUS_BY_KAV_FOR_VZ
947
		[12] => PINNACLE_CART_ECOMMERCE_SHOPPING_CART
948
		[13] => SYMANTEC_NORTON_INTERNET_SECURITY_10SEATS_MONTHLY
949
		[14] => ATI_PRO_FOR_WIN
950
		[15] => STOPTHEHACKER-M
951
		[16] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN_FOR_VZ
952
		[17] => SB10X-PA
953
		[18] => ATI_PRO
954
		[19] => CRT-30-UNL-L
955
		[20] => 4PSA_VOIPNOW_25_PROFESSIONAL
956
		[21] => CLOUDLINUX-L-M
957
		[22] => ATMAIL_WEBMAIL
958
		[23] => PLESK_10_AND_LATER_FOR_WIN
959
		[24] => CRT-5-100-L
960
		[25] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-1Y
961
		[26] => UNITY-ONE-W-M
962
		[27] => PLESK-10-AND-LATER-FOR-WIN-FOR-VMM
963
		[28] => GLOBAL_MENTORING_LIVE_EXPERT_BASIC
964
		[29] => CRT-50-UNL-L
965
		[30] => VIRTUOZZO_CONTAINERS_4
966
		[31] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_VZ
967
		[32] => PLESK_10_AND_LATER_FOR_VZ
968
		[33] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-FOR-VZ-L-M
969
		[34] => CRT-50-100-L
970
		[35] => UNITY-ONE-L-M
971
		[36] => PLESK_ANTIVIRUS_BY_DRWEB
972
		[37] => SYMANTEC_NORTON_INTERNET_SECURITY_MONTHLY
973
		[38] => CRT-100-UNL-L
974
		[39] => PARALLELS-CLOUD-SERVER
975
		[40] => PARALLELS-PREMIUM-OUTBOUND-ANTISPAM-L-1Y
976
		[41] => CRT-100-100-L
977
		[42] => PLESK_10_AND_LATER_FOR_WIN_FOR_VZ
978
		[43] => PPA-L-M
979
		[44] => PARALLELS_PREMIUM_ANTIVIRUS_FOR_WIN
980
		[45] => PARALLELS-PREMIUM-ANTIVIRUS-FOR-VMM
981
		[46] => PLESK_ANTIVIRUS_BY_KAV_FOR_WIN
982
		[47] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_VZ
983
		[48] => SYMANTEC_NORTON_INTERNET_SECURITY_5SEATS_MONTHLY
984
		[49] => UNITY_MOBILE
985
		[50] => PLESK_ANTIVIRUS_BY_DRWEB_FOR_WIN_FOR_VZ
986
		[51] => SB10X
987
		[52] => UNITY_MOBILE_FOR_WIN
988
		[53] => PARALLELS-CLOUD-STORAGE
989
		[54] => CRT-30-100-L
990
		[55] => CLOUDFLARE-M
991
		[56] => VIRTUOZZO_CONTAINERS_4_FOR_WIN
992
		[57] => PLESK_10_AND_LATER
993
		[58] => PARALLELS_PREMIUM_ANTIVIRUS
994
		[59] => SYMANTEC_NORTON_INTERNET_SECURITY_3SEATS_MONTHLY
995
		[60] => PLESK_ANTIVIRUS_BY_KAV
996
		[61] => KEEPIT_ONLINE_BACKUP
997
		)
998
999
		)
1000
		*/
1001
	}
1002
1003
}
1004