Documentation

TableNode extends Node
in package

Table of Contents

TYPE_PRETTY  = 'pretty'
TYPE_SIMPLE  = 'simple'
$classes  : array<string|int, string>
$data  : array<string|int, TableRow>
$headers  : array<string|int, bool>
$type  : string
$value  : Node|callable|string|null
$currentLineNumber  : int
$errors  : array<string|int, string>
$isCompiled  : bool
$options  : array<string|int, mixed>
$rawDataLines  : array<string|int, string>
$separatorLineConfigs  : array<int, TableSeparatorLineConfig>
__construct()  : mixed
finalize()  : void
getClasses()  : array<string|int, string>
getClassesString()  : string
getCols()  : int
getData()  : array<string|int, TableRow>
getHeaders()  : array<string|int, bool>
Returns an of array of which rows should be headers, where the row index is the key of the array and the value is always true.
getOption()  : mixed|null
getOptions()  : array<string, mixed>
getRows()  : int
getValue()  : Node|callable|string|null
getValueString()  : string
pushContentLine()  : void
pushSeparatorLine()  : void
setClasses()  : void
setValue()  : void
withOptions()  : self
normalizeLines()  : string
addError()  : void
compile()  : void
Looks at all the raw data and finally populates the data and headers.
compilePrettyTable()  : void
compileSimpleTable()  : void
findColumnInPreviousRows()  : TableColumn
getTableAsString()  : string

Constants

TYPE_PRETTY

public mixed TYPE_PRETTY = 'pretty'

TYPE_SIMPLE

public mixed TYPE_SIMPLE = 'simple'

Properties

$classes

protected array<string|int, string> $classes = []

$headers

protected array<string|int, bool> $headers = []

$value

protected Node|callable|string|null $value

$currentLineNumber

private int $currentLineNumber = 0

$errors

private array<string|int, string> $errors = []

$isCompiled

private bool $isCompiled = false

$options

private array<string|int, mixed> $options

$rawDataLines

private array<string|int, string> $rawDataLines = []

Methods

getClasses()

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

getClassesString()

public getClassesString() : string
Return values
string

getCols()

public getCols() : int
Return values
int

getHeaders()

Returns an of array of which rows should be headers, where the row index is the key of the array and the value is always true.

public getHeaders() : array<string|int, bool>
Return values
array<string|int, bool>

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>

getRows()

public getRows() : int
Return values
int

getValue()

public getValue() : Node|callable|string|null
Return values
Node|callable|string|null

getValueString()

public getValueString() : string
Return values
string

pushContentLine()

public pushContentLine(string $line) : void
Parameters
$line : string
Return values
void

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>
Return values
string

addError()

private addError(string $message) : void
Parameters
$message : string
Return values
void

compile()

Looks at all the raw data and finally populates the data and headers.

private compile() : void
Return values
void

compilePrettyTable()

private compilePrettyTable() : void
Return values
void

compileSimpleTable()

private compileSimpleTable() : void
Return values
void

findColumnInPreviousRows()

private findColumnInPreviousRows(int $columnIndex, array<string|int, TableRow$rows, int $currentRowIndex) : TableColumn
Parameters
$columnIndex : int
$rows : array<string|int, TableRow>
$currentRowIndex : int
Return values
TableColumn

getTableAsString()

private getTableAsString() : string
Return values
string

Search results