final class FieldWriter

Writes the value of one bold field section of a card.

Prose is escaped text, metadata a nested list, and list fields bullet lists or "None." when empty.

Methods§

public function write(string $name, mixed $value, array<string, string> $links): string

Writes a field value.

Parameters

$namestringThe field name
$valuemixedThe value in the shape of the YAML field
$linksarray<string, string>Link targets read for this field by linked ID

Returns

string The Markdown section body

Throws

InvalidInputException When the value cannot be written for that field
JsonException When a metadata value cannot be encoded
Test cases 5
Called from 1
Calls 13

Test cases 8§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 5
Other tests reaching this symbol 3

Relations§

Instantiated in 1
Method calls 1