1 | <?php |
||
9 | class RecoveryCodeCollection extends BaseObject |
||
10 | { |
||
11 | protected $codes = []; |
||
12 | |||
13 | protected $count = 10; |
||
14 | |||
15 | protected $blocks = 4; |
||
16 | |||
17 | protected $blockLength = 3; |
||
18 | |||
19 | protected $blockSeparator = '-'; |
||
20 | |||
21 | public function getCodes(): array |
||
25 | |||
26 | public function setCount(int $count): void |
||
30 | |||
31 | public function getCount(): int |
||
35 | |||
36 | public function setBlocks(int $blocks): void |
||
40 | |||
41 | public function getBlocks(): int |
||
45 | |||
46 | public function setBlockLength(int $length): void |
||
50 | |||
51 | public function getBlockLength(): int |
||
55 | |||
56 | public function setBlockSeparator(string $separator): void |
||
60 | |||
61 | public function getBlockSeparator(): string |
||
65 | |||
66 | public function generate(): self |
||
75 | |||
76 | public function save(): bool |
||
91 | |||
92 | public function remove(): int { |
||
97 | |||
98 | private function generateCode(): string |
||
107 | |||
108 | private function generateBlock(): string |
||
112 | |||
113 | private function reset(): self |
||
119 | |||
120 | } |