PluginProbe ʕ •ᴥ•ʔ
FAPI Member / 2.2.25
FAPI Member v2.2.25
2.2.33 2.2.32 trunk 1.9.47 2.1.18 2.2.24 2.2.25 2.2.26 2.2.28 2.2.29 2.2.30 2.2.31
fapi-member / src / Model / ApiConnection.php
fapi-member / src / Model Last commit date
Enums 9 months ago ApiConnection.php 9 months ago MemberLevel.php 9 months ago MemberSection.php 9 months ago Membership.php 9 months ago MembershipChange.php 9 months ago Page.php 9 months ago Settings.php 9 months ago User.php 9 months ago
ApiConnection.php
37 lines
1 <?php
2
3 namespace FapiMember\Model;
4
5 use FapiMember\Library\SmartEmailing\Types\StringType;
6
7 class ApiConnection
8 {
9 private string|null $apiUser;
10 private string|null $apiKey;
11
12 public function __construct(string|null $apiUser, string|null $apiKey)
13 {
14 $this->apiUser = StringType::fromOrNull($apiUser);
15 $this->apiKey = StringType::fromOrNull($apiKey);
16 }
17
18 public function getApiUser(): string|null
19 {
20 return $this->apiUser;
21 }
22
23 public function getApiKey(): string|null
24 {
25 return $this->apiKey;
26 }
27
28 public function toArray(): array
29 {
30 return [
31 'api_user' => $this->apiUser,
32 'api_key' => $this->apiKey,
33 ];
34 }
35
36 }
37