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 setCount(int $count): self |
||
27 | |||
28 | public function getCount(): int |
||
32 | |||
33 | public function setBlocks(int $blocks): self |
||
39 | |||
40 | public function getBlocks(): int |
||
44 | |||
45 | public function setBlockLength(int $length): self |
||
51 | |||
52 | public function getBlockLength(): int |
||
56 | |||
57 | public function setBlockSeparator(string $separator): self |
||
63 | |||
64 | public function getBlockSeparator(): string |
||
68 | |||
69 | public function generate(): array |
||
78 | |||
79 | private function generateCode(): string |
||
88 | |||
89 | private function generateBlock(): string |
||
93 | |||
94 | private function reset(): self |
||
100 | |||
101 | } |