DiscordPHP-NHA Documentation

Health extends Out
in package

A lightweight, read-only wrapper around a single `GET /healthz` response (the `HealthOut` schema): the tick loop liveness probe.

Tags
link

Endpoint reference

#/components/schemas/HealthOut

since
3.0.0

Table of Contents

Properties

$drift  : int
$ok  : bool
$running  : bool
$tick  : int
$fillable  : mixed

Methods

fill()  : void
Stores the full decoded payload, then applies any declared attribute mutators. Unlike the parent, keys absent from `$fillable` are preserved so the model tolerates the extra keys the NHA API is allowed to add.
jsonSerialize()  : array<string|int, mixed>
Serialises back to the full raw payload (lossless), not just the declared subset, so round-tripping an NHA response never discards fields.

Properties

$drift

public int $drift

Scheduler drift in milliseconds.

$ok

public bool $ok

Whether the service is healthy.

$running

public bool $running

Whether the tick loop is advancing.

$tick

public int $tick

Current world tick.

$fillable

protected mixed $fillable = ['ok', 'tick', 'running', 'drift']
Tags
inheritdoc

Methods

fill()

Stores the full decoded payload, then applies any declared attribute mutators. Unlike the parent, keys absent from `$fillable` are preserved so the model tolerates the extra keys the NHA API is allowed to add.

public fill(array<string|int, mixed> $attributes) : void
Parameters
$attributes : array<string|int, mixed>

The decoded response body.

jsonSerialize()

Serialises back to the full raw payload (lossless), not just the declared subset, so round-tripping an NHA response never discards fields.

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>
On this page

Search results