G. php / Suscripcion.php

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 $SUS_ENDPOINT;
11
 public string $SUS_PUB_KEY;
12
 public string $SUS_AUT_TOK;
13
 public string $SUS_CONT_ENCOD;
14
15
 public function __construct(
16
  string $SUS_ENDPOINT = "",
17
  string $SUS_PUB_KEY = "",
18
  string $SUS_AUT_TOK = "",
19
  string $SUS_CONT_ENCOD = ""
20
 ) {
21
  $this->SUS_ENDPOINT = $SUS_ENDPOINT;
22
  $this->SUS_PUB_KEY = $SUS_PUB_KEY;
23
  $this->SUS_AUT_TOK = $SUS_AUT_TOK;
24
  $this->SUS_CONT_ENCOD = $SUS_CONT_ENCOD;
25
 }
26
27
 public function getEndpoint(): string
28
 {
29
  return $this->SUS_ENDPOINT;
30
 }
31
32
 public function getPublicKey(): ?string
33
 {
34
  return $this->SUS_PUB_KEY;
35
 }
36
37
 public function getAuthToken(): ?string
38
 {
39
  return $this->SUS_AUT_TOK;
40
 }
41
42
 public function getContentEncoding(): ?string
43
 {
44
  return $this->SUS_CONT_ENCOD;
45
 }
46
}
47
skip_previous skip_next