FileAccess Orion

ArrayTable
in package

Table of Contents

$cs  : int
$head  : mixed
$keys  : int
$mH  : int
$mW  : int
$pcen  : mixed
$pcol  : mixed
$prow  : mixed
$rows  : array<string|int, mixed>
$rs  : int
__construct()  : mixed
Prepare array into textual format
render()  : mixed
Prints the data to a text table
setMaxHeight()  : mixed
Set the maximum height (number of lines) per row before truncating
setMaxWidth()  : mixed
Set the maximum width (number of characters) per column before truncating
showHeaders()  : mixed
Show the headers using the key values of the array for the titles
mbStPad()  : mixed
printHeading()  : mixed
printLine()  : mixed
printRow()  : mixed
setHeading()  : mixed
setMax()  : mixed

Properties

$cs

private int $cs = array()

The column width settings

$keys

private int $keys = array()

The Column index of keys

$mH

private int $mH = 2

Max Column Height (returns)

$rows

private array<string|int, mixed> $rows

The array for processing

$rs

private int $rs = array()

The Row lines settings

Methods

__construct()

Prepare array into textual format

public __construct(array<string|int, mixed> &$rows) : mixed
Parameters
$rows : array<string|int, mixed>

The input array

Return values
mixed

render()

Prints the data to a text table

public render([bool $return = false ]) : mixed
Parameters
$return : bool = false

Set to 'true' to return text rather than printing

Return values
mixed

setMaxHeight()

Set the maximum height (number of lines) per row before truncating

public setMaxHeight(int $maxHeight) : mixed
Parameters
$maxHeight : int
Return values
mixed

setMaxWidth()

Set the maximum width (number of characters) per column before truncating

public setMaxWidth(int $maxWidth) : mixed
Parameters
$maxWidth : int
Return values
mixed

showHeaders()

Show the headers using the key values of the array for the titles

public showHeaders(bool $bool) : mixed
Parameters
$bool : bool
Return values
mixed

mbStPad()

private mbStPad(mixed $input, mixed $pad_length, mixed $pad_string, mixed $pad_style[, mixed $encoding = "UTF-8" ]) : mixed
Parameters
$input : mixed
$pad_length : mixed
$pad_string : mixed
$pad_style : mixed
$encoding : mixed = "UTF-8"
Return values
mixed

printHeading()

private printHeading() : mixed
Return values
mixed

printLine()

private printLine([mixed $nl = true ]) : mixed
Parameters
$nl : mixed = true
Return values
mixed

printRow()

private printRow(mixed $rowKey) : mixed
Parameters
$rowKey : mixed
Return values
mixed

setHeading()

private setHeading() : mixed
Return values
mixed

setMax()

private setMax(mixed $rowKey, mixed $colKey, mixed &$colVal) : mixed
Parameters
$rowKey : mixed
$colKey : mixed
$colVal : mixed
Return values
mixed

Search results