1 | <?php |
||
7 | class PhpExtensionCheck extends AbstractCheck |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $extension; |
||
11 | |||
12 | /** @var string */ |
||
13 | protected $greaterEquals; |
||
14 | |||
15 | /** @var string */ |
||
16 | protected $lessThan; |
||
17 | |||
18 | /** |
||
19 | * @param string $label Label |
||
20 | * @param string $extension extension to be tested |
||
21 | * @param string $greaterEquals minimum version (optional) |
||
22 | * @param string $lessThan version has to be smaller than this (optional) |
||
23 | */ |
||
24 | public function __construct(string $label, string $extension, string $greaterEquals = null, string $lessThan = null) |
||
31 | |||
32 | /** |
||
33 | * Gets version constraint string for display within the error message. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | protected function getVersionConstraintString(): string |
||
49 | |||
50 | /** |
||
51 | * Finds out whether the extension is loaded. |
||
52 | * |
||
53 | * @return bool |
||
54 | */ |
||
55 | protected function isExtensionLoaded(): bool |
||
59 | |||
60 | /** |
||
61 | * Gets the installed extension version. |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | protected function getExtensionVersion(): string |
||
69 | |||
70 | /** |
||
71 | * Check URL |
||
72 | * |
||
73 | * @return Result |
||
74 | */ |
||
75 | public function checkStatus(): Result |
||
92 | } |
||
93 |