Lifecycle
the lifecycle class handles a plugin’s life cycle from installation to uninstallation.
Class-Namespace
use Bethropolis\PluginSystem\Lifecycle;
Class Methods
$this->onInstallation($pluginName)
executed when a plugin is installed
$this->onUninstallation($pluginName)
executed when a plugin is uninstalled
$this->processPluginFiles($pluginName, $action)
private
Process plugin files. eg plugin.json
this allows it to perform plugin configurations e.t.c
$this->getPluginConfigPath($pluginName)
private
return the path to the plugin’s config file
$this->append($targetFile, $requireFile, $pluginName)
private
Appends a require statement to a target file if it doesn’t already exist.
$this->remove($targetFile, $requireFile, $pluginName)
private
Undos the require statement from $this-append() .
$this->resolveAbsolutePath($path)
private
Resolves the absolute path from a given path.
$this->resolveRelativePath($path, $basePath)
private
Resolves the relative path from a given base path.