1<?php
2declare(strict_types = 1);
3
4namespace 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 */
22interface PrerequisiteInterface
23{
24    /**
25     * Get speaking name of this prerequisite
26     *
27     * @return string
28     */
29    public function getTitle(): string;
30
31    /**
32     * Ensure this prerequisite is fulfilled
33     *
34     * Gets called if "isFulfilled" returns false
35     * and should ensure the prerequisite
36     *
37     * Returns true on success, false on error
38     *
39     * @see isFulfilled
40     * @return bool
41     */
42    public function ensure(): bool;
43
44    /**
45     * Is this prerequisite met?
46     *
47     * Checks whether this prerequisite is fulfilled. If it is not,
48     * ensure should be called to fulfill it.
49     *
50     * @see ensure
51     * @return bool
52     */
53    public function isFulfilled(): bool;
54}
55