1 | <?php |
||
5 | final class CertificateType |
||
6 | { |
||
7 | const PRIVATE_KEY = 'private.pem'; |
||
8 | const PUBLIC_KEY = 'public.pem'; |
||
9 | const BUNQ_SERVER_KEY = 'public_server_key.pem'; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $certificateType; |
||
15 | |||
16 | /** |
||
17 | * @return self[] |
||
18 | */ |
||
19 | public static function all() |
||
27 | |||
28 | /** |
||
29 | * @return string[] |
||
30 | */ |
||
31 | public static function allAsString() |
||
39 | |||
40 | /** |
||
41 | * @return CertificateType |
||
42 | */ |
||
43 | public static function PRIVATE_KEY() |
||
47 | |||
48 | /** |
||
49 | * @return CertificateType |
||
50 | */ |
||
51 | public static function PUBLIC_KEY() |
||
55 | |||
56 | /** |
||
57 | * @return CertificateType |
||
58 | */ |
||
59 | public static function BUNQ_SERVER_KEY() |
||
63 | |||
64 | /** |
||
65 | * @param $certificate |
||
66 | * |
||
67 | * @return CertificateType |
||
68 | */ |
||
69 | public static function fromString($certificate) |
||
73 | |||
74 | /** |
||
75 | * @param mixed $other |
||
76 | * |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function equals($other) |
||
83 | |||
84 | /** |
||
85 | * @return string |
||
86 | */ |
||
87 | public function toString() |
||
91 | |||
92 | /** |
||
93 | * @return string |
||
94 | */ |
||
95 | public function __toString() |
||
99 | |||
100 | /** |
||
101 | * @param string $certificateType |
||
102 | */ |
||
103 | private function __construct($certificateType) |
||
109 | |||
110 | /** |
||
111 | * Check if the certificateType exists in our list |
||
112 | */ |
||
113 | private function protect() |
||
119 | } |
||
120 |