[BUGFIX] Suffix all interfaces with Interface
[Packages/TYPO3.CMS.git] / typo3 / sysext / install / Classes / Updates / PrerequisiteInterface.php
1 <?php
2 declare(strict_types = 1);
3
4 namespace TYPO3\CMS\Install\Updates;
5
6 /*
7 * This file is part of the TYPO3 CMS project.
8 *
9 * It is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License, either version 2
11 * of the License, or any later version.
12 *
13 * For the full copyright and license information, please read the
14 * LICENSE.txt file that was distributed with this source code.
15 *
16 * The TYPO3 project - inspiring people to share!
17 */
18
19 /**
20 * UpgradeWizard Prerequisites
21 *
22 * @internal
23 */
24 interface PrerequisiteInterface
25 {
26 /**
27 * Get speaking name of this prerequisite
28 *
29 * @return string
30 */
31 public function getTitle(): string;
32
33 /**
34 * Ensure this prerequisite is fulfilled
35 *
36 * Gets called if "isFulfilled" returns false
37 * and should ensure the prerequisite
38 *
39 * Returns true on success, false on error
40 *
41 * @see isFulfilled
42 * @return bool
43 */
44 public function ensure(): bool;
45
46 /**
47 * Is this prerequisite met?
48 *
49 * Checks whether this prerequisite is fulfilled. If it is not,
50 * ensure should be called to fulfill it.
51 *
52 * @see ensure
53 * @return bool
54 */
55 public function isFulfilled(): bool;
56 }