1 | <?php |
||
5 | class DbExportHandler |
||
6 | { |
||
7 | /** |
||
8 | * @var DbMigrations |
||
9 | */ |
||
10 | protected $migrator; |
||
11 | |||
12 | /** |
||
13 | * @var DbSeeding |
||
14 | */ |
||
15 | protected $seeder; |
||
16 | |||
17 | /** |
||
18 | * Inject the DbMigrations class. |
||
19 | * |
||
20 | * @param DbMigrations $DbMigrations |
||
21 | * @param DbSeeding $DbSeeding |
||
22 | */ |
||
23 | public function __construct(DbMigrations $DbMigrations, DbSeeding $DbSeeding) |
||
28 | |||
29 | //end __construct() |
||
30 | |||
31 | /** |
||
32 | * Create migrations from the given DB. |
||
33 | * |
||
34 | * @param string null $database |
||
35 | * |
||
36 | * @return $this |
||
37 | */ |
||
38 | public function migrate($database = null) |
||
44 | |||
45 | //end migrate() |
||
46 | |||
47 | /** |
||
48 | * @param null $database |
||
49 | * |
||
50 | * @return $this |
||
51 | */ |
||
52 | public function seed($database = null) |
||
58 | |||
59 | //end seed() |
||
60 | |||
61 | /** |
||
62 | * Helper function to generate the migration and the seed in one command. |
||
63 | * |
||
64 | * @param null $database |
||
65 | * |
||
66 | * @return $this |
||
67 | */ |
||
68 | public function migrateAndSeed($database = null) |
||
78 | |||
79 | //end migrateAndSeed() |
||
80 | |||
81 | /** |
||
82 | * Add tables to the ignore array. |
||
83 | * |
||
84 | * @param $tables |
||
85 | * |
||
86 | * @return $this |
||
87 | */ |
||
88 | public function ignore(...$tables) |
||
94 | |||
95 | //end ignore() |
||
96 | |||
97 | /** |
||
98 | * @return mixed |
||
99 | */ |
||
100 | public function getMigrationsFilePath() |
||
104 | |||
105 | //end getMigrationsFilePath() |
||
106 | |||
107 | public function uploadTo($remote) |
||
113 | |||
114 | //end uploadTo() |
||
115 | }//end class |
||
116 |