-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSettings.php
More file actions
60 lines (47 loc) · 1.69 KB
/
Settings.php
File metadata and controls
60 lines (47 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
declare(strict_types=1);
namespace SkillDisplay\PHPToolKit\Configuration;
class Settings
{
private string $user_secret = '';
private string $apiKey = '';
private int $verifierID = 0;
private string $APIUrl = '';
private string $mySkillDisplayUrl = '';
public function getVerifierID(): int
{
return $this->verifierID;
}
public function getUserSecret(): string
{
return $this->user_secret;
}
public function getApiKey(): string
{
return $this->apiKey;
}
public function getAPIUrl(): string
{
return $this->APIUrl;
}
public function getMySkillDisplayUrl(): string
{
return $this->mySkillDisplayUrl;
}
/**
* Settings constructor.
*
* @param string $apiKey API Key to allow the application to use the endpoint
* @param int $verifierID ID of the Verifier entry, necessary for Educational-Verification, Business-Verification or Certification
* @param string $user_secret Secret Key of the Verifier - necessary for Educational-Verification, Business-Verification or Certification
* @param string|null $domain URL of the SkillDisplay instance - usually this will be the public one on skilldisplay.eu
*/
public function __construct(string $apiKey, int $verifierID = 0, string $user_secret = '', string $domain = null)
{
$this->apiKey = $apiKey;
$this->verifierID = $verifierID;
$this->user_secret = $user_secret;
$this->APIUrl = (is_null($domain)) ? 'https://www.skilldisplay.eu' : 'https://' . $domain;
$this->mySkillDisplayUrl = (is_null($domain)) ? 'https://my.skilldisplay.eu' : 'https://my.' . $domain;
}
}