final class Reference

A Markdown link from one item to another, checked once every definition is loaded.

Properties§

public string $id
public string $url
public string $file

Methods§

public function __construct(public string $id, public string $url, public string $file)

Parameters

$idstringThe linked item ID
$urlstringThe link target
$filestringThe Markdown file holding the link
public function validate(array<string, Item> $items): void

Checks that the link points to the file and heading defining the item.

Parameters

$itemsarray<string, Item>Every loaded item by ID

Throws

InvalidInputException When the link is not local, points to another file or has the wrong fragment
Test cases 6
Calls 7

Test cases 13§

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

Dedicated tests 7
Other tests reaching this symbol 6

Relations§

Instantiated in 1