1 | <?php |
||
5 | final class TokenType |
||
6 | { |
||
7 | const INSTALLATION_TOKEN = 'installation.token'; |
||
8 | const SESSION_TOKEN = 'session.token'; |
||
9 | |||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $type; |
||
14 | |||
15 | /** |
||
16 | * @return self[] |
||
17 | */ |
||
18 | public static function all() |
||
25 | |||
26 | /** |
||
27 | * @return string[] |
||
28 | */ |
||
29 | public static function allAsString() |
||
36 | |||
37 | /** |
||
38 | * @return self |
||
39 | */ |
||
40 | public static function INSTALLATION_TOKEN() |
||
44 | |||
45 | /** |
||
46 | * @return self |
||
47 | */ |
||
48 | public static function SESSION_TOKEN() |
||
52 | |||
53 | /** |
||
54 | * @param $type |
||
55 | * |
||
56 | * @return self |
||
57 | */ |
||
58 | public static function fromString($type) |
||
62 | |||
63 | /** |
||
64 | * @param mixed $other |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function equals($other) |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | public function toString() |
||
80 | |||
81 | /** |
||
82 | * @return string |
||
83 | */ |
||
84 | public function __toString() |
||
88 | |||
89 | /** |
||
90 | * @param string $type |
||
91 | */ |
||
92 | private function __construct($type) |
||
98 | |||
99 | /** |
||
100 | * Check if the tokenType exists in our list |
||
101 | */ |
||
102 | private function protect() |
||
108 | } |
||
109 |