Refactor activator class.
This commit is contained in:
@@ -9,6 +9,10 @@ class Activator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
$this->migrator = new Migrator;
|
||||||
|
}
|
||||||
|
|
||||||
|
function register_activation() {
|
||||||
register_activation_hook(
|
register_activation_hook(
|
||||||
Env::$file,
|
Env::$file,
|
||||||
array($this, 'activate')
|
array($this, 'activate')
|
||||||
@@ -16,7 +20,6 @@ class Activator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function activate() {
|
public function activate() {
|
||||||
$migrator = new Migrator;
|
$this->migrator->up();
|
||||||
$migrator->up();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user