1 | <?php |
||
8 | class RedisCanBeAccessed implements Check |
||
9 | { |
||
10 | private $message; |
||
11 | |||
12 | /** |
||
13 | * The name of the check. |
||
14 | * |
||
15 | * @param array $config |
||
16 | * @return string |
||
17 | */ |
||
18 | public function name(array $config): string |
||
22 | |||
23 | /** |
||
24 | * Perform the actual verification of this check. |
||
25 | * |
||
26 | * @param array $config |
||
27 | * @return bool |
||
28 | */ |
||
29 | 16 | public function check(array $config): bool |
|
54 | |||
55 | /** |
||
56 | * The error message to display in case the check does not pass. |
||
57 | * |
||
58 | * @param array $config |
||
59 | * @return string |
||
60 | */ |
||
61 | 8 | public function message(array $config): string |
|
67 | |||
68 | /** |
||
69 | * Tests a redis connection and returns whether the connection is opened or not. |
||
70 | * |
||
71 | * @param string|null $name |
||
72 | * @return bool |
||
73 | */ |
||
74 | 16 | private function testConnection(string $name = null): bool |
|
80 | } |
||
81 |