1 | <?php |
||
8 | final class Health implements \JsonSerializable |
||
9 | { |
||
10 | /** |
||
11 | * @var Status |
||
12 | */ |
||
13 | private $status; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private $details; |
||
19 | |||
20 | /** |
||
21 | * Create a new Health instance with the specified status and details from builder. |
||
22 | * |
||
23 | * @param HealthBuilder $builder |
||
24 | */ |
||
25 | public function __construct(HealthBuilder $builder) |
||
30 | 105 | ||
31 | 105 | /** |
|
32 | * @return Status |
||
33 | */ |
||
34 | public function getStatus() |
||
38 | 99 | ||
39 | /** |
||
40 | * @return array |
||
41 | */ |
||
42 | public function getDetails() |
||
46 | 84 | ||
47 | /** |
||
48 | * Specify data which should be serialized to JSON. |
||
49 | * |
||
50 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
51 | * |
||
52 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
53 | * which is a value of any type other than a resource. |
||
54 | * |
||
55 | * @since 5.4.0 |
||
56 | 6 | */ |
|
57 | public function jsonSerialize() |
||
63 | } |
||
64 |