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): self |
||
32 | |||
33 | public function getCount(): int |
||
37 | |||
38 | public function setBlocks(int $blocks): self |
||
44 | |||
45 | public function getBlocks(): int |
||
49 | |||
50 | public function setBlockLength(int $length): self |
||
56 | |||
57 | public function getBlockLength(): int |
||
61 | |||
62 | public function setBlockSeparator(string $separator): self |
||
68 | |||
69 | public function getBlockSeparator(): string |
||
73 | |||
74 | public function generate(): self |
||
83 | |||
84 | public function save(): bool |
||
99 | |||
100 | private function generateCode(): string |
||
109 | |||
110 | private function generateBlock(): string |
||
114 | |||
115 | private function reset(): self |
||
121 | |||
122 | } |