TableNode
extends CompoundNode
in package
FinalYes
Table of Contents
Properties
- $classes : array<string|int, string>
- $columnWidth : array<string|int, mixed>
- $data : array<string|int, mixed>
- $headers : array<string|int, mixed>
- $options : array<string, scalar|null>
- $value : TValue
Methods
- __construct() : mixed
- addChildNode() : void
- getChildren() : array<string|int, TValue>
- getClasses() : array<string|int, string>
- getClassesString() : string
- getCols() : int
- getColumnWidth() : array<string|int, int>
- getData() : array<string|int, TableRow>
- getHeaders() : array<string|int, TableRow>
- getOption() : mixed
- getOptions() : array<string, scalar|null>
- getRows() : int
- getValue() : TValue
- hasOption() : bool
- pushChildNode() : void
- removeNode() : self
- replaceNode() : self
- setClasses() : void
- Normalizes class names following the rules of identifier-normalization
- setValue() : void
- withColumnWidth() : TableNode
- withKeepExistingOptions() : static
- Adds $options as default options without overriding any options already set.
- withOptions() : static
Properties
$classes
protected
array<string|int, string>
$classes
= []
$columnWidth
protected
array<string|int, mixed>
$columnWidth
= []
$data
protected
array<string|int, mixed>
$data
$headers
protected
array<string|int, mixed>
$headers
= []
$options
protected
array<string, scalar|null>
$options
= []
$value
protected
TValue
$value
Methods
__construct()
public
__construct(array<string|int, TableRow> $data[, array<string|int, TableRow> $headers = [] ][, array<string|int, int> $columnWidth = [] ]) : mixed
Parameters
addChildNode()
public
addChildNode(TValue $node) : void
Parameters
- $node : TValue
getChildren()
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
stringgetCols()
public
getCols() : int
Return values
intgetColumnWidth()
public
getColumnWidth() : array<string|int, int>
Return values
array<string|int, int>getData()
public
getData() : array<string|int, TableRow>
Return values
array<string|int, TableRow>getHeaders()
public
getHeaders() : array<string|int, TableRow>
Return values
array<string|int, TableRow>getOption()
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>getRows()
public
getRows() : int
Return values
intgetValue()
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
setValue()
public
setValue(TValue $value) : void
Parameters
- $value : TValue
withColumnWidth()
public
withColumnWidth(array<string|int, int> $columnWidth) : TableNode
Parameters
- $columnWidth : array<string|int, int>
Return values
TableNodewithKeepExistingOptions()
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>