Map
extends Out
in package
A lightweight, read-only wrapper around a single `GET /map` response (the `MapOut` schema): the ASCII biome map and agent pins.
Tags
Table of Contents
Properties
- $agents : array<string|int, mixed>
- $ascii : string|null
- $h : int
- $loading : bool
- $seed : int
- $w : 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
$agents
public
array<string|int, mixed>
$agents
Agent position pins.
$ascii
public
string|null
$ascii
Rendered ASCII map, or null while loading.
$h
public
int
$h
Map height in tiles.
$loading
public
bool
$loading
Whether the map is still being generated.
$seed
public
int
$seed
World generation seed.
$w
public
int
$w
Map width in tiles.
$fillable
protected
mixed
$fillable
= ['seed', 'w', 'h', 'ascii', 'agents', 'loading']
Tags
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>