1 | <?php |
||
11 | class CompositeHealthIndicator implements HealthIndicatorInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var HealthIndicatorInterface[] |
||
15 | */ |
||
16 | private $indicators; |
||
17 | |||
18 | /** |
||
19 | * @var HealthAggregatorInterface |
||
20 | */ |
||
21 | private $healthAggregator; |
||
22 | |||
23 | /** |
||
24 | * Create a new CompositeHealthIndicator from the specified indicators. |
||
25 | * |
||
26 | * @param HealthAggregatorInterface $healthAggregator |
||
27 | * @param HealthIndicatorInterface[] $indicators |
||
28 | */ |
||
29 | public function __construct(HealthAggregatorInterface $healthAggregator, array $indicators = []) |
||
36 | 15 | ||
37 | 15 | /** |
|
38 | * @param string $name |
||
39 | * @param HealthIndicatorInterface $indicator |
||
40 | */ |
||
41 | public function addHealthIndicator($name, HealthIndicatorInterface $indicator) |
||
45 | 12 | ||
46 | 12 | /** |
|
47 | * Return an indication of health. |
||
48 | * |
||
49 | * @return Health |
||
50 | */ |
||
51 | public function health() |
||
60 | } |
||
61 |