1 | <?php |
||
18 | class ConfigFileCheck implements CheckInterface |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Filename of config |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | private $filename = ''; |
||
27 | |||
28 | /** |
||
29 | * Bool if the file is readable |
||
30 | * |
||
31 | * @var bool |
||
32 | */ |
||
33 | private $isReadable; |
||
34 | |||
35 | /** |
||
36 | * Bool if the file was found |
||
37 | * |
||
38 | * @var bool |
||
39 | */ |
||
40 | private $isFound; |
||
41 | |||
42 | 5 | public function __construct($filename) |
|
46 | |||
47 | /** |
||
48 | * Executes the check itselfs |
||
49 | * |
||
50 | * @return boolean |
||
51 | */ |
||
52 | 3 | public function check() |
|
61 | |||
62 | /** |
||
63 | * Returns the message, if the check succeeded |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | 1 | public function getSuccessMessage() |
|
73 | |||
74 | /** |
||
75 | * Returns the message, if the check fails |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | 1 | public function getFailureMessage() |
|
100 | |||
101 | /** |
||
102 | * Returns if this check is optional or required. |
||
103 | * |
||
104 | * @return bool |
||
105 | */ |
||
106 | 1 | public function isOptional() |
|
110 | } |
||
111 |