1 | <?php namespace nyx\auth; |
||
12 | class Token implements interfaces\Token |
||
13 | { |
||
14 | /** |
||
15 | * @var string The Token's identifier. |
||
16 | */ |
||
17 | protected $id; |
||
18 | |||
19 | /** |
||
20 | * Creates a new Token instance. |
||
21 | * |
||
22 | * @param string $id The Token's identifier. |
||
23 | */ |
||
24 | public function __construct(string $id) |
||
28 | |||
29 | /** |
||
30 | * {@inheritDoc} |
||
31 | */ |
||
32 | public function getId() : string |
||
36 | |||
37 | /** |
||
38 | * {@inheritDoc} |
||
39 | */ |
||
40 | public function matches(interfaces\Token $that) : bool |
||
44 | |||
45 | /** |
||
46 | * {@inheritDoc} |
||
47 | */ |
||
48 | public function serialize() : string |
||
52 | |||
53 | /** |
||
54 | * {@inheritDoc} |
||
55 | */ |
||
56 | public function unserialize($data) |
||
60 | |||
61 | /** |
||
62 | * {@inheritDoc} |
||
63 | */ |
||
64 | public function jsonSerialize() |
||
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | public function toJson(int $options = 0) : string |
||
76 | |||
77 | /** |
||
78 | * {@inheritDoc} |
||
79 | */ |
||
80 | public function toString() : string |
||
84 | |||
85 | /** |
||
86 | * {@inheritDoc} |
||
87 | */ |
||
88 | public function __toString() : string |
||
92 | |||
93 | /** |
||
94 | * {@inheritDoc} |
||
95 | */ |
||
96 | public function toArray() : array |
||
102 | } |
||
103 |