diff --git a/src/components/ModuleInstaller.php b/src/components/ModuleInstaller.php index cd4ee43..13bbd05 100644 --- a/src/components/ModuleInstaller.php +++ b/src/components/ModuleInstaller.php @@ -150,7 +150,21 @@ protected function varExport($var, $indent = "") return var_export($var, true); } } -} - + protected function createFile($alias, $override = true) + { + $path = \Yii::getAlias($alias); + if (file_exists($path) && $override) { + @unlink($path); + } + touch($path); + } + protected function deleteFile($alias) + { + $path = \Yii::getAlias($alias); + if (file_exists($path)) { + @unlink($path); + } + } +} \ No newline at end of file