1 | <?php |
||
7 | abstract class Seeder |
||
8 | { |
||
9 | /** |
||
10 | * SeedRunner instance. |
||
11 | * |
||
12 | * @var SeedRunner |
||
13 | */ |
||
14 | protected $runner; |
||
15 | |||
16 | /** |
||
17 | * Output strategy. |
||
18 | * |
||
19 | * @var Output |
||
20 | */ |
||
21 | protected $output; |
||
22 | |||
23 | /** |
||
24 | * Run the database seed logic. |
||
25 | */ |
||
26 | abstract public function run(); |
||
27 | |||
28 | /** |
||
29 | * Call the run method on the given seeder class. |
||
30 | * |
||
31 | * @param string $class |
||
32 | */ |
||
33 | protected function call($class) |
||
37 | |||
38 | /** |
||
39 | * Set SeedRunner instance on object. |
||
40 | * |
||
41 | * @param SeedRunner $runner |
||
42 | * |
||
43 | * @return $this |
||
44 | */ |
||
45 | public function setRunner(SeedRunner $runner) |
||
51 | |||
52 | /** |
||
53 | * Set output strategy on object. |
||
54 | * |
||
55 | * @param Output $output |
||
56 | * |
||
57 | * @return $this |
||
58 | */ |
||
59 | public function setOutput(Output $output) |
||
65 | } |
||
66 |