| 1 | <?php |
||
| 9 | abstract class AbstractHealthAggregator implements HealthAggregatorInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Aggregate several given Health instances into one. |
||
| 13 | * |
||
| 14 | * @param Health[] $healths |
||
| 15 | * |
||
| 16 | * @return Health |
||
| 17 | */ |
||
| 18 | public function aggregate($healths) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param Status[] $candidates |
||
| 33 | * |
||
| 34 | * @return Status |
||
| 35 | */ |
||
| 36 | abstract protected function aggregateStatus($candidates); |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Return the map of 'aggregate' details that should be used from the specified |
||
| 40 | * healths. |
||
| 41 | * |
||
| 42 | * @param Health[] $healths |
||
| 43 | * |
||
| 44 | 30 | * @return array |
|
| 45 | */ |
||
| 46 | 30 | protected function aggregateDetails($healths) |
|
| 50 | } |
||
| 51 |