1 | <?php |
||
14 | class CompositeHealthIndicator implements HealthIndicatorInterface, JsonSerializable |
||
15 | { |
||
16 | /** |
||
17 | * @var HealthIndicatorInterface[] |
||
18 | */ |
||
19 | private $indicators; |
||
20 | |||
21 | /** |
||
22 | * @var HealthAggregatorInterface |
||
23 | */ |
||
24 | private $healthAggregator; |
||
25 | |||
26 | /** |
||
27 | * Create a new CompositeHealthIndicator from the specified indicators. |
||
28 | * |
||
29 | * @param HealthAggregatorInterface $healthAggregator |
||
30 | * @param HealthIndicatorInterface[] $indicators |
||
31 | */ |
||
32 | public function __construct(HealthAggregatorInterface $healthAggregator, array $indicators = array()) |
||
39 | |||
40 | /** |
||
41 | * @param string $name |
||
42 | * @param HealthIndicatorInterface $indicator |
||
43 | */ |
||
44 | public function addHealthIndicator($name, HealthIndicatorInterface $indicator) |
||
48 | |||
49 | /** |
||
50 | * Return an indication of health. |
||
51 | * |
||
52 | * @return Health |
||
53 | */ |
||
54 | public function health() |
||
63 | |||
64 | /** |
||
65 | * Specify data which should be serialized to JSON |
||
66 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
67 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
68 | * which is a value of any type other than a resource. |
||
69 | * @since 5.4.0 |
||
70 | */ |
||
71 | public function jsonSerialize() |
||
75 | } |
||
76 |