final class SearchIndex
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

The index the search box reads, written as a script beside the pages.

Splitting a catalog across pages is what makes it readable and what makes a statement hard to find, so the split comes with an index of every statement and the page it is on. The index is a script rather than data fetched at runtime, so the report still works opened from a file. The report's own script ranks it and hands each hit to doc-ui's search box to show.

Constants§

public const LENGTH = 240

How much of a statement the index carries.

Methods§

public function __construct(?HtmlText $text = null)

Wires the index to the text rendering the entries are shortened with.

Parameters

$text?HtmlText
Calls 1
public function render(ReportSite $site): string

The index as the script the pages load.

Parameters

Returns

string
Test cases 1
Called from 1
Calls 3
public function entryToArray(
    ReportSite $site,
    CatalogEntry $entry,
): array{q: string, w: string, f: string, t: string, u: string, k: string, r: string}

One statement as the search reads it: the text, where it is issued, what it names, and where it is written up.

Parameters

Returns

array{q: string, w: string, f: string, t: string, u: string, k: string, r: string}
Test cases 2
Called from 1
Calls 9

Private surface 1§

Implementation details, listed for orientation only.

private HtmlText $text

Test cases 5§

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

Dedicated tests 3
Other tests reaching this symbol 2

Relations§

Instantiated in 1
Method calls 1