2 namespace wcf\system\package\plugin
;
3 use wcf\system\package\PackageArchive
;
6 * Every PackageInstallationPlugin has to implement this interface.
9 * @copyright 2001-2014 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package com.woltlab.wcf
12 * @subpackage system.package.plugin
13 * @category Community Framework
15 interface IPackageInstallationPlugin
{
17 * Executes the installation of this plugin.
19 public function install();
22 * Executes the update of this plugin.
24 public function update();
27 * Returns true if the uninstallation of the given package should execute
32 public function hasUninstall();
35 * Executes the uninstallation of this plugin.
37 public function uninstall();
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.
43 * @param \wcf\system\package\PackageArchive $packageArchive
44 * @param string $instruction
47 public static function isValid(PackageArchive
$packageArchive, $instruction);