HealthResponse
in package
implements
JsonSerializable
Response body for `GET /health`. `profile` and `unavailable` are additive (G-8, D-59): a client that reads only `status` is unaffected.
Table of Contents
Interfaces
- JsonSerializable
Properties
- $profile : string
- $status : string
- $unavailable : array<string|int, mixed>|null
Methods
- __construct() : mixed
- Constructs a HealthResponse.
- fromArray() : self
- Rebuilds a HealthResponse from one decoded JSON object.
- jsonSerialize() : array<string, mixed>
- Renders this object for `json_encode()`.
- toArray() : array<string, mixed>
- Renders this object back to its wire form.
Properties
$profile read-only
public
string
$profile
$status read-only
public
string
$status
$unavailable read-only
public
array<string|int, mixed>|null
$unavailable
= null
Methods
__construct()
Constructs a HealthResponse.
public
__construct(string $profile, string $status[, array<int, string>|null $unavailable = null ]) : mixed
Parameters
- $profile : string
-
The messaging profile this process runs:
full(RabbitMQ is used) orminimal(AXIAM__AMQP__ENABLED=false, no broker). - $status : string
-
the server's
statusfield - $unavailable : array<int, string>|null = null
-
Present only in the
minimalprofile: the capabilities it does not provide —reactors,amqp_authz,amqp_audit_ingestionanddecision_cache_broadcast. Absent infull. (optional)
fromArray()
Rebuilds a HealthResponse from one decoded JSON object.
public
static fromArray(array<string, mixed> $data) : self
Parameters
- $data : array<string, mixed>
-
The raw wire object.
Return values
selfjsonSerialize()
Renders this object for `json_encode()`.
public
jsonSerialize() : array<string, mixed>
Any Sensitive it carries stays WRAPPED here, so a log line or a
json_encode($model) in application code prints [SENSITIVE]. The one place a secret
is revealed is ManagementTransport, on the way to the wire
and nowhere else (§27.5).
Return values
array<string, mixed>toArray()
Renders this object back to its wire form.
public
toArray() : array<string, mixed>
§27.4 rule 5: a null property is OMITTED, not emitted as null. On a sparse update those two say opposite things — "leave this alone" versus "set this to nothing" — and only omission means the first.