Skip to content

Commit

Permalink
some hooks in Installable class
Browse files Browse the repository at this point in the history
  • Loading branch information
Zrnik committed Nov 12, 2021
1 parent f13d1f5 commit 8e0dc82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/MkSQL.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/Utilities/Installable.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ private function executeInstallation(): void

// Process Updated
$this->updater->installable = null;
$this->beforeInstallation();
$this->updater->install();
$this->afterInstallation();
}

public static function uninstallAll(PDO $pdo): void
Expand Down Expand Up @@ -103,4 +105,10 @@ public static function uninstallAll(PDO $pdo): void
return $this->updater->tableList();
}

/** Hook fired before the 'install' function of the updater */
protected function beforeInstallation(): void { }

/** Hook fired after the 'install' function of the updater */
protected function afterInstallation(): void { }

}

0 comments on commit 8e0dc82

Please sign in to comment.