mirror of
https://github.com/SkillDisplay/PHPToolKit.git
synced 2024-11-24 08:36:09 +01:00
Added property types
This commit is contained in:
parent
71188fe34c
commit
d6d9c293f5
10 changed files with 26 additions and 98 deletions
|
@ -31,15 +31,9 @@ use SkillDisplay\PHPToolKit\Entity\Campaign;
|
||||||
|
|
||||||
class Campaigns
|
class Campaigns
|
||||||
{
|
{
|
||||||
/**
|
protected Settings $settings;
|
||||||
* @var Settings
|
|
||||||
*/
|
|
||||||
protected $settings;
|
|
||||||
|
|
||||||
/**
|
protected Client $client;
|
||||||
* @var Client
|
|
||||||
*/
|
|
||||||
protected $client;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Settings $settings,
|
Settings $settings,
|
||||||
|
|
|
@ -31,15 +31,9 @@ use SkillDisplay\PHPToolKit\Entity\Skill as Entity;
|
||||||
|
|
||||||
class Skill
|
class Skill
|
||||||
{
|
{
|
||||||
/**
|
protected Settings $settings;
|
||||||
* @var Settings
|
|
||||||
*/
|
|
||||||
protected $settings;
|
|
||||||
|
|
||||||
/**
|
protected Client $client;
|
||||||
* @var Client
|
|
||||||
*/
|
|
||||||
protected $client;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Settings $settings,
|
Settings $settings,
|
||||||
|
|
|
@ -31,15 +31,9 @@ use SkillDisplay\PHPToolKit\Entity\SkillSet as Entity;
|
||||||
|
|
||||||
class SkillSet
|
class SkillSet
|
||||||
{
|
{
|
||||||
/**
|
protected Settings $settings;
|
||||||
* @var Settings
|
|
||||||
*/
|
|
||||||
protected $settings;
|
|
||||||
|
|
||||||
/**
|
protected Client $client;
|
||||||
* @var Client
|
|
||||||
*/
|
|
||||||
protected $client;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Settings $settings,
|
Settings $settings,
|
||||||
|
|
|
@ -6,30 +6,15 @@ namespace SkillDisplay\PHPToolKit\Configuration;
|
||||||
|
|
||||||
class Settings
|
class Settings
|
||||||
{
|
{
|
||||||
/**
|
private string $user_secret = '';
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $user_secret = '';
|
|
||||||
|
|
||||||
/**
|
private string $apiKey = '';
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $apiKey = '';
|
|
||||||
|
|
||||||
/**
|
private int $verifierID = 0;
|
||||||
* @var int
|
|
||||||
*/
|
|
||||||
private $verifierID = 0;
|
|
||||||
|
|
||||||
/**
|
private string $APIUrl = '';
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $APIUrl = '';
|
|
||||||
|
|
||||||
/**
|
private string $mySkillDisplayUrl = '';
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $mySkillDisplayUrl = '';
|
|
||||||
|
|
||||||
public function getVerifierID(): int
|
public function getVerifierID(): int
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,15 +27,9 @@ use SkillDisplay\PHPToolKit\Configuration\Settings;
|
||||||
|
|
||||||
class Brand
|
class Brand
|
||||||
{
|
{
|
||||||
/**
|
private array $data;
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private $data;
|
|
||||||
|
|
||||||
/**
|
private Settings $settings;
|
||||||
* @var Settings
|
|
||||||
*/
|
|
||||||
private $settings;
|
|
||||||
|
|
||||||
private function __construct(array $data, Settings $settings)
|
private function __construct(array $data, Settings $settings)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,15 +27,9 @@ use SkillDisplay\PHPToolKit\Configuration\Settings;
|
||||||
|
|
||||||
class Campaign
|
class Campaign
|
||||||
{
|
{
|
||||||
/**
|
private array $data;
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private $data;
|
|
||||||
|
|
||||||
/**
|
private Settings $settings;
|
||||||
* @var Settings
|
|
||||||
*/
|
|
||||||
private $settings;
|
|
||||||
|
|
||||||
public function __construct(array $data, Settings $settings)
|
public function __construct(array $data, Settings $settings)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,20 +27,11 @@ use SkillDisplay\PHPToolKit\Configuration\Settings;
|
||||||
|
|
||||||
class Skill
|
class Skill
|
||||||
{
|
{
|
||||||
/**
|
private array $data;
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private $data;
|
|
||||||
|
|
||||||
/**
|
private Settings $settings;
|
||||||
* @var Settings
|
|
||||||
*/
|
|
||||||
private $settings;
|
|
||||||
|
|
||||||
/**
|
private array $brands = [];
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private $brands = [];
|
|
||||||
|
|
||||||
private function __construct(array $data, Settings $settings)
|
private function __construct(array $data, Settings $settings)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,25 +27,13 @@ use SkillDisplay\PHPToolKit\Configuration\Settings;
|
||||||
|
|
||||||
class SkillSet
|
class SkillSet
|
||||||
{
|
{
|
||||||
/**
|
private array $data;
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private $data;
|
|
||||||
|
|
||||||
/**
|
private Settings $settings;
|
||||||
* @var Settings
|
|
||||||
*/
|
|
||||||
private $settings;
|
|
||||||
|
|
||||||
/**
|
private array $skills = [];
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private $skills = [];
|
|
||||||
|
|
||||||
/**
|
private ?Brand $brand = null;
|
||||||
* @var Brand|null
|
|
||||||
*/
|
|
||||||
private $brand = null;
|
|
||||||
|
|
||||||
private function __construct(array $data, Settings $settings)
|
private function __construct(array $data, Settings $settings)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,4 +14,4 @@ use SkillDisplay\PHPToolKit\Verification\Issuer;
|
||||||
// In order to grant an Educational Verification you just need to exchange the constant to VERIFICATION_EDUCATIONAL
|
// In order to grant an Educational Verification you just need to exchange the constant to VERIFICATION_EDUCATIONAL
|
||||||
// (your Verifier Account needs the according permissions)
|
// (your Verifier Account needs the according permissions)
|
||||||
$myVerificationTool = new Issuer($mySettings);
|
$myVerificationTool = new Issuer($mySettings);
|
||||||
$myVerificationTool->outputResponse($myVerificationTool->issueVerification(193, '--skilldisplay-user-email--', VERIFICATION_BUSINESS, 567));
|
$myVerificationTool->outputResponse($myVerificationTool->issueVerification(175, '--skilldisplay-user-email--', VERIFICATION_BUSINESS, false, 567, true));
|
||||||
|
|
|
@ -10,15 +10,9 @@ use SkillDisplay\PHPToolKit\Configuration\Settings;
|
||||||
|
|
||||||
class Issuer
|
class Issuer
|
||||||
{
|
{
|
||||||
/**
|
private Settings $settings;
|
||||||
* @var Settings
|
|
||||||
*/
|
|
||||||
private $settings;
|
|
||||||
|
|
||||||
/**
|
private string $apislug = '/api/v1/verification/create';
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
private $apislug = '/api/v1/verification/create';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $ID ID of the Skill or SkillSet
|
* @param int $ID ID of the Skill or SkillSet
|
||||||
|
@ -26,7 +20,7 @@ class Issuer
|
||||||
* @param string $vtype one of VERIFICATION_SELF, VERIFICATION_EDUCATIONAL, VERIFICATION_BUSINESS, VERIFICATION_CERTIFICATION
|
* @param string $vtype one of VERIFICATION_SELF, VERIFICATION_EDUCATIONAL, VERIFICATION_BUSINESS, VERIFICATION_CERTIFICATION
|
||||||
* @param bool $isSkillSet
|
* @param bool $isSkillSet
|
||||||
* @param int $campaignId
|
* @param int $campaignId
|
||||||
*
|
* @param bool $autoConfirm
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function generateSignedRequestData(
|
private function generateSignedRequestData(
|
||||||
|
|
Loading…
Reference in a new issue