Guides

ProjectNode extends CompoundNode
in package

FinalYes

Table of Contents

Properties

$classes  : string[]
$options  : array<string, scalar|scalar[]|null>
$value  : TValue
$citationTargets  : array<string, CitationTarget>
$copyright  : string|null
$documentEntries  : array<string, DocumentEntryNode>
$globalMenues  : NavMenuNode[]
$internalLinkTargets  : array<string, array<string, InternalTarget>>
$keywords  : array<int, string>
$lastRendered  : DateTimeImmutable
$release  : string|null
$rootDocumentEntry  : DocumentEntryNode|null
Cached root document entry for O(1) lookup
$title  : string|null
$variables  : array<string, Node>
Variables are replacements in a document or project.
$version  : string|null

Methods

__construct()  : mixed
addChildNode()  : void
addCitationTarget()  : void
addDocumentEntry()  : void
addKeywords()  : void
addLinkTarget()  : void
addMetaData()  : void
Attaches data about this node that is not part of its content.
addVariable()  : void
findDocumentEntry()  : DocumentEntryNode|null
getAllDocumentEntries()  : DocumentEntryNode[]
getAllInternalTargets()  : array<string, array<string, InternalTarget>>
getChildren()  : TValue[]
getCitationTarget()  : CitationTarget|null
getClasses()  : string[]
getClassesString()  : string
getCopyright()  : string|null
getDocumentEntry()  : DocumentEntryNode
getGlobalMenues()  : NavMenuNode[]
getInternalTarget()  : InternalTarget|null
getKeywords()  : array<int, string>
getLastRendered()  : DateTimeImmutable
getMetaData()  : array<string, DataNode>
getOption()  : mixed
getOptions()  : array<string, scalar|scalar[]|null>
getRelease()  : string|null
getRootDocumentEntry()  : DocumentEntryNode
getTitle()  : string|null
getValue()  : TValue
getVariable()  : Node|null
getVariables()  : array<string, Node>
getVersion()  : string|null
hasInternalTarget()  : bool
hasOption()  : bool
pushChildNode()  : void
removeNode()  : static
replaceNode()  : static
reset()  : void
setClasses()  : void
Normalizes class names following the rules of identifier-normalization
setCopyright()  : void
setDocumentEntries()  : void
setGlobalMenues()  : ProjectNode
setKeywords()  : void
setRelease()  : void
setTitle()  : void
setValue()  : void
setVersion()  : void
withKeepExistingOptions()  : static
Adds $options as default options without overriding any options already set.
withOptions()  : static

Properties

$options

protected array<string, scalar|scalar[]|null> $options = []

$lastRendered

private DateTimeImmutable $lastRendered

$variables

Variables are replacements in a document or project.

private array<string, Node> $variables = []

Variables like |project| and |version| are replaced globally

Methods

__construct()

public __construct([string|null $title = null ][, string|null $version = null ][, string|null $release = null ][, string|null $copyright = null ][, DateTimeImmutable|null $lastRendered = null ]) : mixed
Parameters
$title : string|null = null
$version : string|null = null
$release : string|null = null
$copyright : string|null = null
$lastRendered : DateTimeImmutable|null = null

addChildNode()

public addChildNode(TValue $node) : void
Parameters
$node : TValue

addKeywords()

public addKeywords(array<int, string> $keywords) : void
Parameters
$keywords : array<int, string>

addMetaData()

Attaches data about this node that is not part of its content.

public addMetaData(DataNode $data) : void

Rendered as a data-* attribute where the node's template asks for it. A name that is already taken gets the new values added to the ones it has, rather than replaced by them. DataNode

Parameters
$data : DataNode

addVariable()

public addVariable(string $name, Node $value) : void
Parameters
$name : string
$value : Node

getChildren()

public getChildren() : TValue[]
Return values
TValue[]

getClasses()

public getClasses() : string[]
Return values
string[]

getClassesString()

public getClassesString() : string
Return values
string

getCopyright()

public getCopyright() : string|null
Return values
string|null

getKeywords()

public getKeywords() : array<int, string>
Return values
array<int, string>

getLastRendered()

public getLastRendered() : DateTimeImmutable
Return values
DateTimeImmutable

getOption()

public getOption(string $name[, TType|null $default = null ]) : mixed
Parameters
$name : string
$default : TType|null = null
Tags
phpstan-return

($default is null ? mixed|null: TType|null)

getOptions()

public getOptions() : array<string, scalar|scalar[]|null>
Return values
array<string, scalar|scalar[]|null>

getRelease()

public getRelease() : string|null
Return values
string|null

getTitle()

public getTitle() : string|null
Return values
string|null

getValue()

public getValue() : TValue
Return values
TValue

getVariable()

public getVariable(string $name, Node|null $default) : Node|null
Parameters
$name : string
$default : Node|null
Return values
Node|null

getVariables()

public getVariables() : array<string, Node>
Return values
array<string, Node>

getVersion()

public getVersion() : string|null
Return values
string|null

hasOption()

public hasOption(string $name) : bool
Parameters
$name : string
Return values
bool

pushChildNode()

public pushChildNode(TValue $node) : void
Parameters
$node : TValue

removeNode()

public removeNode(int $key) : static
Parameters
$key : int
Return values
static

replaceNode()

public replaceNode(int $key, TValue $node) : static
Parameters
$key : int
$node : TValue
Return values
static

setCopyright()

public setCopyright(string $copyright) : void
Parameters
$copyright : string

setKeywords()

public setKeywords(array<int, string> $keywords) : void
Parameters
$keywords : array<int, string>

setRelease()

public setRelease(string $release) : void
Parameters
$release : string

setTitle()

public setTitle(string $title) : void
Parameters
$title : string

setValue()

public setValue(TValue $value) : void
Parameters
$value : TValue

setVersion()

public setVersion(string $version) : void
Parameters
$version : string

withKeepExistingOptions()

Adds $options as default options without overriding any options already set.

public withKeepExistingOptions(array<string, scalar|null> $options) : static
Parameters
$options : array<string, scalar|null>
Return values
static

withOptions()

public withOptions(array<string, scalar|scalar[]|null> $options) : static
Parameters
$options : array<string, scalar|scalar[]|null>
Return values
static
On this page

Search results