\FAA\Obj\UtilArrayTable

Summary

Methods
Properties
Constants
__construct()
showHeaders()
setMaxWidth()
setMaxHeight()
render()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
setHeading()
printLine()
printHeading()
printRow()
mbStPad()
setMax()
$rows
$cs
$rs
$keys
$mH
$mW
$head
$pcen
$prow
$pcol
N/A

Properties

$rows

$rows :array

Type

array—The array for processing

$cs

$cs :integer

Type

integer—The column width settings

$rs

$rs :integer

Type

integer—The Row lines settings

$keys

$keys :integer

Type

integer—The Column index of keys

$mH

$mH :integer

Type

integer—Max Column Height (returns)

$mW

$mW :integer

Type

integer—Max Row Width (chars)

$head

$head :

Type

$pcen

$pcen :

Type

$prow

$prow :

Type

$pcol

$pcol :

Type

Methods

__construct()

__construct(array  $rows)

Prepare array into textual format

Parameters

array $rows

The input array

showHeaders()

showHeaders(boolean  $bool)

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

Parameters

boolean $bool

setMaxWidth()

setMaxWidth(integer  $maxWidth)

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

Parameters

integer $maxWidth

setMaxHeight()

setMaxHeight(integer  $maxHeight)

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

Parameters

integer $maxHeight

render()

render(boolean  $return = false): mixed

Prints the data to a text table

Parameters

boolean $return

Set to 'true' to return text rather than printing

Returns

mixed

setHeading()

setHeading()

printLine()

printLine(  $nl = true)

Parameters

$nl

printHeading()

printHeading()

printRow()

printRow(  $rowKey)

Parameters

$rowKey

mbStPad()

mbStPad(  $input,  $pad_length,  $pad_string,  $pad_style,  $encoding = "UTF-8")

Parameters

$input
$pad_length
$pad_string
$pad_style
$encoding

setMax()

setMax(  $rowKey,  $colKey,  $colVal)

Parameters

$rowKey
$colKey
$colVal