1 | <?php |
||
14 | abstract class AbstractCommand extends \Symfony\Component\Console\Command\Command |
||
15 | { |
||
16 | /** |
||
17 | * @var \CI_Controller |
||
18 | */ |
||
19 | protected $codeigniter; |
||
20 | |||
21 | /** |
||
22 | * @var \Rougin\Describe\Describe |
||
23 | */ |
||
24 | protected $describe; |
||
25 | |||
26 | /** |
||
27 | * @var \League\Flysystem\Filesystem |
||
28 | */ |
||
29 | protected $filesystem; |
||
30 | |||
31 | /** |
||
32 | * @var \Twig_Environment |
||
33 | */ |
||
34 | protected $renderer; |
||
35 | |||
36 | /** |
||
37 | * @param \CI_Controller $codeigniter |
||
38 | * @param \Rougin\Describe\Describe $describe |
||
39 | * @param \League\Flysystem\Filesystem $filesystem |
||
40 | * @param \Twig_Environment $renderer |
||
41 | */ |
||
42 | 33 | public function __construct(\CI_Controller $codeigniter, Describe $describe, Filesystem $filesystem, \Twig_Environment $renderer) |
|
51 | |||
52 | /** |
||
53 | * Changes the migration version. |
||
54 | * |
||
55 | * @param integer $current |
||
56 | * @param integer $timestamp |
||
57 | * @return void |
||
58 | */ |
||
59 | 9 | public function changeVersion($current, $timestamp) |
|
69 | |||
70 | /** |
||
71 | * Gets the latest migration version |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | 12 | public function getLatestVersion() |
|
84 | |||
85 | /** |
||
86 | * Gets list of migrations from the specified directory. |
||
87 | * |
||
88 | * @param string $path |
||
89 | * @return array |
||
90 | */ |
||
91 | 12 | public function getMigrations($path) |
|
115 | |||
116 | /** |
||
117 | * Checks whether the command is enabled or not in the current environment. |
||
118 | * |
||
119 | * @return boolean |
||
120 | */ |
||
121 | 3 | public function isEnabled() |
|
127 | |||
128 | /** |
||
129 | * Enables/disables the Migration Class. |
||
130 | * |
||
131 | * @param boolean $enabled |
||
132 | * @return void |
||
133 | */ |
||
134 | 9 | public function toggleMigration($enabled = false) |
|
149 | } |
||
150 |