GenericNode
extends Node
in package
Any Directive not explicitly modeled.
To support custom directives, this node type will capture any Directive declaration not otherwise defined in a directive's node definition.
A generic node contains the name of the Directive (.. name::
) and it can have options (:option:
); in addition
a value can be set after the directive invocation that can be read using the getValue()
method.
Example:
.. name:: value of this directive
:option: optionValue
Table of Contents
- $classes : array<string|int, string>
- $value : Node|callable|string|null
- $name : string
- $options : array<string|int, mixed>
- __construct() : mixed
- getClasses() : array<string|int, string>
- getClassesString() : string
- getName() : string
- getOption() : mixed|null
- getOptions() : array<string, mixed>
- getValue() : Node|callable|string|null
- getValueString() : string
- setClasses() : void
- setValue() : void
- withOptions() : self
- normalizeLines() : string
Properties
$classes
protected
array<string|int, string>
$classes
= []
$value
protected
Node|callable|string|null
$value
$name
private
string
$name
$options
private
array<string|int, mixed>
$options
Methods
__construct()
public
__construct(string $name[, Node|callable|string|null $value = null ]) : mixed
Parameters
- $name : string
- $value : Node|callable|string|null = null
Return values
mixed —getClasses()
public
getClasses() : array<string|int, string>
Return values
array<string|int, string> —getClassesString()
public
getClassesString() : string
Return values
string —getName()
public
getName() : string
Return values
string —getOption()
public
getOption(string $name[, mixed|null $default = null ]) : mixed|null
Parameters
- $name : string
- $default : mixed|null = null
Return values
mixed|null —getOptions()
public
getOptions() : array<string, mixed>
Return values
array<string, mixed> —getValue()
public
getValue() : Node|callable|string|null
Return values
Node|callable|string|null —getValueString()
public
getValueString() : string
Return values
string —setClasses()
public
setClasses(array<string|int, string> $classes) : void
Parameters
- $classes : array<string|int, string>
Return values
void —setValue()
public
setValue(Node|callable|string|null $value) : void
Parameters
- $value : Node|callable|string|null
Return values
void —withOptions()
public
withOptions(array<string, mixed> $options) : self
Parameters
- $options : array<string, mixed>
Return values
self —normalizeLines()
protected
normalizeLines(array<string|int, string> $lines) : string
Parameters
- $lines : array<string|int, string>