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