Commit | Line | Data |
---|---|---|
158bd3ca TD |
1 | <?php |
2 | namespace wcf\system\package\plugin; | |
870b0938 | 3 | use wcf\system\package\PackageArchive; |
158bd3ca TD |
4 | |
5 | /** | |
a17de04e | 6 | * Every PackageInstallationPlugin has to implement this interface. |
158bd3ca TD |
7 | * |
8 | * @author Marcel Werk | |
ca4ba303 | 9 | * @copyright 2001-2014 WoltLab GmbH |
158bd3ca TD |
10 | * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php> |
11 | * @package com.woltlab.wcf | |
12 | * @subpackage system.package.plugin | |
9f959ced | 13 | * @category Community Framework |
158bd3ca TD |
14 | */ |
15 | interface IPackageInstallationPlugin { | |
16 | /** | |
17 | * Executes the installation of this plugin. | |
18 | */ | |
19 | public function install(); | |
20 | ||
21 | /** | |
22 | * Executes the update of this plugin. | |
23 | */ | |
24 | public function update(); | |
25 | ||
26 | /** | |
28410a97 | 27 | * Returns true if the uninstallation of the given package should execute |
a17de04e | 28 | * this plugin. |
158bd3ca TD |
29 | * |
30 | * @return boolean | |
31 | */ | |
32 | public function hasUninstall(); | |
33 | ||
34 | /** | |
35 | * Executes the uninstallation of this plugin. | |
36 | */ | |
37 | public function uninstall(); | |
870b0938 AE |
38 | |
39 | /** | |
40 | * Validates if the passed instruction is valid for this package installation plugin. If anything is | |
41 | * wrong with it, this method should return false. | |
42 | * | |
43 | * @param \wcf\system\package\PackageArchive $packageArchive | |
44 | * @param string $instruction | |
45 | * @return boolean | |
46 | */ | |
47 | public static function isValid(PackageArchive $packageArchive, $instruction); | |
dcb3a44c | 48 | } |