ProjectNode
extends CompoundNode
in package
FinalYes
Table of Contents
Properties
- $classes : array<string|int, string>
- $options : array<string, scalar|null>
- $value : TValue
- $citationTargets : array<string, CitationTarget>
- $copyright : string|null
- $documentEntries : array<string|int, DocumentEntryNode>
- $globalMenues : array<string|int, NavMenuNode>
- $internalLinkTargets : array<string, array<string, InternalTarget>>
- $keywords : array<int, string>
- $lastRendered : DateTimeImmutable
- $release : string|null
- $title : string|null
- $variables : array<string|int, 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
- addVariable() : void
- findDocumentEntry() : DocumentEntryNode|null
- getAllDocumentEntries() : array<string|int, DocumentEntryNode>
- getAllInternalTargets() : array<string, array<string, InternalTarget>>
- getChildren() : array<string|int, TValue>
- getCitationTarget() : CitationTarget|null
- getClasses() : array<string|int, string>
- getClassesString() : string
- getCopyright() : string|null
- getDocumentEntry() : DocumentEntryNode
- getGlobalMenues() : array<string|int, NavMenuNode>
- getInternalTarget() : InternalTarget|null
- getKeywords() : array<int, string>
- getLastRendered() : DateTimeImmutable
- getOption() : mixed
- getOptions() : array<string, 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() : self
- replaceNode() : self
- 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
$classes
protected
array<string|int, string>
$classes
= []
$options
protected
array<string, scalar|null>
$options
= []
$value
protected
TValue
$value
$citationTargets
private
array<string, CitationTarget>
$citationTargets
= []
$copyright
private
string|null
$copyright
= null
$documentEntries
private
array<string|int, DocumentEntryNode>
$documentEntries
= []
$globalMenues
private
array<string|int, NavMenuNode>
$globalMenues
= []
$internalLinkTargets
private
array<string, array<string, InternalTarget>>
$internalLinkTargets
= []
$keywords
private
array<int, string>
$keywords
= []
$lastRendered
private
DateTimeImmutable
$lastRendered
$release
private
string|null
$release
= null
$title
private
string|null
$title
= null
$variables
Variables are replacements in a document or project.
private
array<string|int, Node>
$variables
= []
Variables like |project| and |version| are replaced globally
$version
private
string|null
$version
= null
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
addCitationTarget()
public
addCitationTarget(CitationTarget $target) : void
Parameters
- $target : CitationTarget
addDocumentEntry()
public
addDocumentEntry(DocumentEntryNode $documentEntry) : void
Parameters
- $documentEntry : DocumentEntryNode
addKeywords()
public
addKeywords(array<int, string> $keywords) : void
Parameters
- $keywords : array<int, string>
addLinkTarget()
public
addLinkTarget(string $anchorName, InternalTarget $target) : void
Parameters
- $anchorName : string
- $target : InternalTarget
Tags
addVariable()
public
addVariable(string $name, Node $value) : void
Parameters
- $name : string
- $value : Node
findDocumentEntry()
public
findDocumentEntry(string $filePath) : DocumentEntryNode|null
Parameters
- $filePath : string
Return values
DocumentEntryNode|nullgetAllDocumentEntries()
public
getAllDocumentEntries() : array<string|int, DocumentEntryNode>
Return values
array<string|int, DocumentEntryNode>getAllInternalTargets()
public
getAllInternalTargets() : array<string, array<string, InternalTarget>>
Return values
array<string, array<string, InternalTarget>>getChildren()
public
getChildren() : array<string|int, TValue>
Return values
array<string|int, TValue>getCitationTarget()
public
getCitationTarget(string $name) : CitationTarget|null
Parameters
- $name : string
Return values
CitationTarget|nullgetClasses()
public
getClasses() : array<string|int, string>
Return values
array<string|int, string>getClassesString()
public
getClassesString() : string
Return values
stringgetCopyright()
public
getCopyright() : string|null
Return values
string|nullgetDocumentEntry()
public
getDocumentEntry(string $file) : DocumentEntryNode
Parameters
- $file : string
Tags
Return values
DocumentEntryNodegetGlobalMenues()
public
getGlobalMenues() : array<string|int, NavMenuNode>
Return values
array<string|int, NavMenuNode>getInternalTarget()
public
getInternalTarget(string $anchorName[, string $linkType = SectionNode::STD_LABEL ]) : InternalTarget|null
Parameters
- $anchorName : string
- $linkType : string = SectionNode::STD_LABEL
Return values
InternalTarget|nullgetKeywords()
public
getKeywords() : array<int, string>
Return values
array<int, string>getLastRendered()
public
getLastRendered() : DateTimeImmutable
Return values
DateTimeImmutablegetOption()
public
getOption(string $name[, TType|null $default = null ]) : mixed
Parameters
- $name : string
- $default : TType|null = null
Tags
getOptions()
public
getOptions() : array<string, scalar|null>
Return values
array<string, scalar|null>getRelease()
public
getRelease() : string|null
Return values
string|nullgetRootDocumentEntry()
public
getRootDocumentEntry() : DocumentEntryNode
Return values
DocumentEntryNodegetTitle()
public
getTitle() : string|null
Return values
string|nullgetValue()
public
getValue() : TValue
Return values
TValuegetVariable()
public
getVariable(string $name, Node|null $default) : Node|null
Parameters
- $name : string
- $default : Node|null
Return values
Node|nullgetVariables()
public
getVariables() : array<string, Node>
Return values
array<string, Node>getVersion()
public
getVersion() : string|null
Return values
string|nullhasInternalTarget()
public
hasInternalTarget(string $anchorName[, string $linkType = SectionNode::STD_LABEL ]) : bool
Parameters
- $anchorName : string
- $linkType : string = SectionNode::STD_LABEL
Return values
boolhasOption()
public
hasOption(string $name) : bool
Parameters
- $name : string
Return values
boolpushChildNode()
public
pushChildNode(TValue $node) : void
Parameters
- $node : TValue
removeNode()
public
removeNode(int $key) : self
Parameters
- $key : int
Tags
Return values
selfreplaceNode()
public
replaceNode(int $key, TValue $node) : self
Parameters
- $key : int
- $node : TValue
Tags
Return values
selfreset()
public
reset() : void
setClasses()
Normalizes class names following the rules of identifier-normalization
public
setClasses(array<string|int, string> $classes) : void
Parameters
- $classes : array<string|int, string>
Tags
setCopyright()
public
setCopyright(string $copyright) : void
Parameters
- $copyright : string
setDocumentEntries()
public
setDocumentEntries(array<string|int, DocumentEntryNode> $documentEntries) : void
Parameters
- $documentEntries : array<string|int, DocumentEntryNode>
setGlobalMenues()
public
setGlobalMenues(array<string|int, NavMenuNode> $globalMenues) : ProjectNode
Parameters
- $globalMenues : array<string|int, NavMenuNode>
Return values
ProjectNodesetKeywords()
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
staticwithOptions()
public
withOptions(array<string, scalar|null> $options) : static
Parameters
- $options : array<string, scalar|null>