1 | <?php |
||
8 | abstract class AbstractAnonymizer |
||
9 | { |
||
10 | /** |
||
11 | * The console command instance. |
||
12 | * |
||
13 | * @var \Illuminate\Console\Command |
||
14 | */ |
||
15 | protected $command; |
||
16 | |||
17 | /** |
||
18 | * Core anonymizer. |
||
19 | * |
||
20 | * @var \Arrilot\DataAnonymization\Anonymizer |
||
21 | */ |
||
22 | protected $core; |
||
23 | |||
24 | /** |
||
25 | * AbstractAnonymizer constructor. |
||
26 | * |
||
27 | * @param \Arrilot\DataAnonymization\Anonymizer $core |
||
28 | */ |
||
29 | public function __construct(CoreAnonymizer $core) |
||
30 | { |
||
31 | $this->core = $core; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Run the anonymization. |
||
36 | * |
||
37 | * @return void |
||
38 | */ |
||
39 | abstract public function run(); |
||
40 | |||
41 | /** |
||
42 | * Call selected anonymizer. |
||
43 | * |
||
44 | * @param string $class |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function call($class) |
||
56 | |||
57 | /** |
||
58 | * Describe a table with a given callback. |
||
59 | * |
||
60 | * @param string $name |
||
61 | * @param callable $callback |
||
62 | * |
||
63 | * @return void |
||
64 | */ |
||
65 | public function table($name, callable $callback) |
||
69 | |||
70 | /** |
||
71 | * Set the console command instance. |
||
72 | * |
||
73 | * @param \Illuminate\Console\Command $command |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function setCommand(Command $command) |
||
83 | |||
84 | /** |
||
85 | * Resolve an instance of the given seeder class. |
||
86 | * |
||
87 | * @param string $class |
||
88 | * |
||
89 | * @return AbstractAnonymizer |
||
90 | */ |
||
91 | protected function resolve($class) |
||
101 | } |
||
102 |