1 | <?php |
||
16 | class FallbackRandomGenerator implements RandomGenerator |
||
17 | { |
||
18 | /** @var RandomGenerator|null */ |
||
19 | private $first; |
||
20 | |||
21 | /** @var RandomGenerator|null */ |
||
22 | private $second; |
||
23 | |||
24 | /** |
||
25 | * @param RandomGenerator $first |
||
26 | * @param RandomGenerator $second |
||
27 | */ |
||
28 | public function __construct(RandomGenerator $first = null, RandomGenerator $second = null) |
||
33 | |||
34 | /** |
||
35 | * @return RandomGenerator|null |
||
36 | */ |
||
37 | public function getFirst() |
||
41 | |||
42 | /** |
||
43 | * @param RandomGenerator|null $first |
||
44 | * |
||
45 | * @return FallbackRandomGenerator |
||
46 | */ |
||
47 | public function setFirst(RandomGenerator $first = null) |
||
53 | |||
54 | /** |
||
55 | * @return RandomGenerator|null |
||
56 | */ |
||
57 | public function getSecond() |
||
61 | |||
62 | /** |
||
63 | * @param RandomGenerator|null $second |
||
64 | * |
||
65 | * @return FallbackRandomGenerator |
||
66 | */ |
||
67 | public function setSecond(RandomGenerator $second = null) |
||
73 | |||
74 | /** |
||
75 | * @param int $bytesLength |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function get($bytesLength) |
||
89 | } |
||
90 |