1 | <?php |
||
46 | class Registration implements RegistrationInterface, JsonSerializable |
||
47 | { |
||
48 | /** |
||
49 | * The key handle of the registered authenticator |
||
50 | * @var string |
||
51 | */ |
||
52 | private $keyHandle; |
||
53 | |||
54 | /** |
||
55 | * The public key of the registered authenticator |
||
56 | * @var string |
||
57 | */ |
||
58 | private $publicKey; |
||
59 | |||
60 | /** |
||
61 | * The attestation certificate of the registered authenticator |
||
62 | * @var string |
||
63 | */ |
||
64 | private $certificate; |
||
65 | |||
66 | /** |
||
67 | * The counter associated with this registration |
||
68 | * @var int |
||
69 | */ |
||
70 | private $counter = -1; |
||
71 | |||
72 | /** |
||
73 | * Registration constructor. |
||
74 | * @param string $keyHandle |
||
75 | * @param string $publicKey |
||
76 | * @param string $certificate |
||
77 | * @param int $counter |
||
78 | */ |
||
79 | public function __construct($keyHandle = null, $publicKey = null, $certificate = null, $counter = -1) |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getKeyHandle() |
||
94 | |||
95 | /** |
||
96 | * @param string $keyHandle |
||
97 | * @return RegistrationInterface |
||
98 | */ |
||
99 | public function setKeyHandle($keyHandle) |
||
104 | |||
105 | /** |
||
106 | * @return string |
||
107 | */ |
||
108 | public function getPublicKey() |
||
112 | |||
113 | /** |
||
114 | * @param string $publicKey |
||
115 | * @return RegistrationInterface |
||
116 | */ |
||
117 | public function setPublicKey($publicKey) |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getCertificate() |
||
130 | |||
131 | /** |
||
132 | * @param string $certificate |
||
133 | * @return RegistrationInterface |
||
134 | */ |
||
135 | public function setCertificate($certificate) |
||
140 | |||
141 | /** |
||
142 | * @return int |
||
143 | */ |
||
144 | public function getCounter() |
||
148 | |||
149 | /** |
||
150 | * @param int $counter |
||
151 | * @return RegistrationInterface |
||
152 | */ |
||
153 | public function setCounter($counter) |
||
158 | |||
159 | /** |
||
160 | * Specify data which should be serialized to JSON |
||
161 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
162 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
163 | * which is a value of any type other than a resource. |
||
164 | * @since 5.4.0 |
||
165 | */ |
||
166 | function jsonSerialize() |
||
175 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.