1 <?php
2 /**
3 * PluginInstaller.php
4 *
5 * @author Elvyrra SAS
6 * @license http://rem.mit-license.org/ MIT
7 */
8
9 namespace Hawk;
10
11 /**
12 * This abstract class defines the methods used to install, activate, deactivate, and uninstall plugins
13 *
14 * @package Core\Plugin
15 */
16 abstract class PluginInstaller {
17 /**
18 * The plugin the installer is associated with
19 */
20 private $plugin;
21
22 /**
23 * The plugin name the installer is associated with
24 *
25 * @var string
26 */
27 public $_plugin;
28
29 /**
30 * Constructor
31 *
32 * @param Plugin $plugin The plugin the installer is associated with
33 */
34 public function __construct($plugin){
35 $this->plugin = $plugin;
36 $this->_plugin = $plugin->getName();
37 }
38
39 /**
40 * Install the plugin
41 */
42 abstract public function install();
43
44
45 /**
46 * Uninstall the plugin
47 */
48 abstract public function uninstall();
49
50 /**
51 * Activate the plugin
52 */
53 abstract public function activate();
54
55
56 /**
57 * Deactivate the plugin
58 */
59 abstract public function deactivate();
60 }
61