1 | <?php |
||
16 | class Provider |
||
17 | { |
||
18 | const __CLASS = __CLASS__; |
||
19 | |||
20 | /** |
||
21 | * @var \Faker\Generator |
||
22 | */ |
||
23 | private $faker; |
||
24 | |||
25 | private $salt; |
||
26 | |||
27 | /** |
||
28 | * Initializes Faker, generates new salt for RNG seeds |
||
29 | * |
||
30 | * @param string|null $locale |
||
31 | * @return void |
||
32 | */ |
||
33 | public function initialize($locale = null) |
||
41 | |||
42 | /** |
||
43 | * Resets the UniqueGenerator of Faker, this should be used after anonymizing a database table with |
||
44 | * unique values to free memory and allow the same values in other tables |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function resetUniqueGenerator() |
||
52 | |||
53 | /** |
||
54 | * Return fake data from given Faker provider, always return the same data for each ($formatter, $identifier) |
||
55 | * combination after initialized. |
||
56 | * |
||
57 | * @param $formatter |
||
58 | * @param $identifier |
||
59 | * @return mixed |
||
60 | */ |
||
61 | public function getFakerData($formatter, $identifier, $unique = false) |
||
75 | |||
76 | /** |
||
77 | * @param $identifier |
||
78 | */ |
||
79 | private function seedRng($identifier) |
||
83 | |||
84 | private function resetRng() |
||
90 | } |