| 1 | <?php |
||
| 8 | class ApiHealthChecker |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Boolean wether to use the state storage. |
||
| 12 | * |
||
| 13 | * @var bool |
||
| 14 | */ |
||
| 15 | private $useStateStorage = true; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Disables the use of the state storage. |
||
| 19 | * |
||
| 20 | * @return $this |
||
| 21 | */ |
||
| 22 | public function fresh() |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Returns if the stored state is set to failed or runs the checker |
||
| 31 | * if nothing is stored and returns wether the checker fails. |
||
| 32 | * |
||
| 33 | * @param string $checkerClass |
||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | public function isFailing(string $checkerClass): bool |
||
| 50 | |||
| 51 | /** |
||
| 52 | * The opposite of the 'isFailing' method. |
||
| 53 | * |
||
| 54 | * @param string $checkerClass |
||
| 55 | * @return bool |
||
| 56 | */ |
||
| 57 | public function isPassing(string $checkerClass): bool |
||
| 61 | } |
||
| 62 |