Guides

PageDescriptor
in package
implements JsonSerializable

FinalYes

One page of "toc.json": where it is, which files it was rendered to, its title and its anchor, and the pages its table of contents leads to.

Keys a theme adds go into PageDescriptor::setExtra(); they are written after the anchor and before the pages, so that the key a reader scrolls past last is the one that opens a subtree.

Table of Contents

Interfaces

JsonSerializable

Properties

$anchor  : string
$extra  : array<string, mixed>
$orphan  : bool
$outputFiles  : array
$pages  : array<int, PageDescriptor>
$path  : string
$title  : string

Methods

__construct()  : mixed
addPage()  : self
getAnchor()  : string
getExtra()  : array<string, mixed>
getOutputFiles()  : array<string, string>
getPages()  : array<int, PageDescriptor>
getPath()  : string
getTitle()  : string
isOrphan()  : bool
Whether no table of contents leads to the page.
jsonSerialize()  : array<string, mixed>
setAnchor()  : self
setExtra()  : self
setOutputFiles()  : self
setPath()  : self
setTitle()  : self

Properties

Methods

__construct()

public __construct(string $path, array<string, string> $outputFiles, string $title, string $anchor[, bool $orphan = false ]) : mixed
Parameters
$path : string
$outputFiles : array<string, string>

the file per output format, keyed by the extension it writes

$title : string
$anchor : string
$orphan : bool = false

getExtra()

public getExtra() : array<string, mixed>
Return values
array<string, mixed>

getOutputFiles()

public getOutputFiles() : array<string, string>
Return values
array<string, string>

isOrphan()

Whether no table of contents leads to the page.

public isOrphan() : bool
Return values
bool

jsonSerialize()

public jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>

setAnchor()

public setAnchor(string $anchor) : self
Parameters
$anchor : string
Return values
self

setExtra()

public setExtra(string $key, mixed $value) : self
Parameters
$key : string
$value : mixed
Return values
self

setOutputFiles()

public setOutputFiles(array<string, string> $outputFiles) : self
Parameters
$outputFiles : array<string, string>
Return values
self

setPath()

public setPath(string $path) : self
Parameters
$path : string
Return values
self

setTitle()

public setTitle(string $title) : self
Parameters
$title : string
Return values
self
On this page

Search results