1 | <?php |
||
12 | class Generator |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $migrationsDir; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $migrationNamespace; |
||
23 | |||
24 | /** |
||
25 | * @var Filesystem |
||
26 | */ |
||
27 | protected $filesystem; |
||
28 | |||
29 | /** |
||
30 | * @param Config $config |
||
31 | * @param Filesystem $filesystem |
||
32 | * @throws \Exception |
||
33 | */ |
||
34 | public function __construct(Config $config, Filesystem $filesystem) |
||
40 | |||
41 | /** |
||
42 | * Generate new migration skeleton class |
||
43 | * |
||
44 | * @return string path to new skeleton class file |
||
45 | * @throws \Exception |
||
46 | */ |
||
47 | public function generate() |
||
59 | |||
60 | /** |
||
61 | * Get migration skeleton class raw text |
||
62 | * |
||
63 | * @param string $className |
||
64 | * @return string |
||
65 | */ |
||
66 | protected function getTemplate($className) |
||
96 | } |
||
97 |