TitleNode
extends CompoundNode
in package
FinalYes
Table of Contents
Properties
- $classes : array<string|int, string>
- $id : string
- $level : int
- $options : array<string, scalar|null>
- $target : string
- $value : TValue
Methods
- __construct() : mixed
- addChildNode() : void
- emptyNode() : self
- fromString() : self
- getChildren() : array<string|int, TValue>
- getClasses() : array<string|int, string>
- getClassesString() : string
- getId() : string
- getLevel() : int
- getOption() : mixed
- getOptions() : array<string, scalar|null>
- getTarget() : string
- getValue() : TValue
- hasOption() : bool
- pushChildNode() : void
- removeNode() : self
- replaceNode() : self
- setClasses() : void
- Normalizes class names following the rules of identifier-normalization
- setId() : void
- setLevel() : TitleNode
- setTarget() : void
- setValue() : void
- toString() : string
- withKeepExistingOptions() : static
- Adds $options as default options without overriding any options already set.
- withOptions() : static
Properties
$classes
protected
array<string|int, string>
$classes
= []
$id
protected
string
$id
$level
protected
int
$level
$options
protected
array<string, scalar|null>
$options
= []
$target
protected
string
$target
= ''
$value
protected
TValue
$value
Methods
__construct()
public
__construct(InlineCompoundNode $value, int $level, string $id) : mixed
Parameters
- $value : InlineCompoundNode
- $level : int
- $id : string
addChildNode()
public
addChildNode(TValue $node) : void
Parameters
- $node : TValue
emptyNode()
public
static emptyNode() : self
Return values
selffromString()
public
static fromString(string $titleString) : self
Parameters
- $titleString : string
Return values
selfgetChildren()
public
getChildren() : array<string|int, TValue>
Return values
array<string|int, TValue>getClasses()
public
getClasses() : array<string|int, string>
Return values
array<string|int, string>getClassesString()
public
getClassesString() : string
Return values
stringgetId()
public
getId() : string
Return values
stringgetLevel()
public
getLevel() : int
Return values
intgetOption()
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>getTarget()
public
getTarget() : string
Return values
stringgetValue()
public
getValue() : TValue
Return values
TValuehasOption()
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
selfsetClasses()
Normalizes class names following the rules of identifier-normalization
public
setClasses(array<string|int, string> $classes) : void
Parameters
- $classes : array<string|int, string>
Tags
setId()
public
setId(string $id) : void
Parameters
- $id : string
setLevel()
public
setLevel(int $level) : TitleNode
Parameters
- $level : int
Return values
TitleNodesetTarget()
public
setTarget(string $target) : void
Parameters
- $target : string
setValue()
public
setValue(TValue $value) : void
Parameters
- $value : TValue
toString()
public
toString() : string
Return values
stringwithKeepExistingOptions()
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>