1 | <?php |
2 | |
3 | require_once __DIR__ . "/../vendor/autoload.php"; |
4 | |
5 | use Minishlink\WebPush\SubscriptionInterface; |
6 | |
7 | class Suscripcion implements SubscriptionInterface |
8 | { |
9 | |
10 | public string $endpoint; |
11 | public string $publicKey; |
12 | public string $authToken; |
13 | public string $contentEncoding; |
14 | |
15 | public function __construct( |
16 | string $endpoint = "", |
17 | string $publicKey = "", |
18 | string $authToken = "", |
19 | string $contentEncoding = "" |
20 | ) { |
21 | $this->endpoint = $endpoint; |
22 | $this->publicKey = $publicKey; |
23 | $this->authToken = $authToken; |
24 | $this->contentEncoding = $contentEncoding; |
25 | } |
26 | |
27 | public function getEndpoint(): string |
28 | { |
29 | return $this->endpoint; |
30 | } |
31 | |
32 | public function getPublicKey(): ?string |
33 | { |
34 | return $this->publicKey; |
35 | } |
36 | |
37 | public function getAuthToken(): ?string |
38 | { |
39 | return $this->authToken; |
40 | } |
41 | |
42 | public function getContentEncoding(): ?string |
43 | { |
44 | return $this->contentEncoding; |
45 | } |
46 | } |
47 | |