| 1 | <?php |
||
| 10 | final class Health implements \JsonSerializable |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var Status |
||
| 14 | */ |
||
| 15 | private $status; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | private $details; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Create a new Health instance with the specified status and details from builder. |
||
| 24 | * |
||
| 25 | * @param HealthBuilder $builder |
||
| 26 | */ |
||
| 27 | 18 | public function __construct(HealthBuilder $builder) |
|
| 32 | 18 | ||
| 33 | /** |
||
| 34 | * @return Status |
||
| 35 | */ |
||
| 36 | public function getStatus() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | public function getDetails() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Specify data which should be serialized to JSON |
||
| 51 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
| 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 | * @since 5.4.0 |
||
| 55 | */ |
||
| 56 | public function jsonSerialize() |
||
| 61 | } |
||
| 62 |