Table of Contents
Properties
-
$columns
: array<string|int, mixed>
-
$matrix
: array<string|int, mixed>
-
$rows
: array<string|int, mixed>
-
$columnHeaders
: bool
-
$gridDisplay
: string
-
$isCli
: bool
-
$rowDividers
: bool
-
$rowHeaders
: bool
Methods
-
__construct()
: mixed
-
render()
: string
-
getString()
: string
-
strlen()
: int
-
getColumnWidth()
: int
-
getColumnWidths()
: array<string|int, mixed>
-
renderCells()
: void
-
renderColumnHeader()
: void
-
renderFooter()
: void
-
renderRows()
: void
$columns
protected
array<string|int, mixed>
$columns
$matrix
protected
array<string|int, mixed>
$matrix
$rows
protected
array<string|int, mixed>
$rows
$columnHeaders
private
bool
$columnHeaders
= true
$gridDisplay
private
string
$gridDisplay
$isCli
private
bool
$isCli
$rowDividers
private
bool
$rowDividers
= false
private
bool
$rowHeaders
= true
__construct()
public
__construct(array<string|int, mixed> $matrix[, bool $isCli = true ][, bool $rowDividers = false ][, bool $rowHeaders = true ][, bool $columnHeaders = true ]) : mixed
Parameters
-
$matrix
: array<string|int, mixed>
-
-
$isCli
: bool
= true
-
-
$rowDividers
: bool
= false
-
-
$rowHeaders
: bool
= true
-
-
$columnHeaders
: bool
= true
-
render()
public
render() : string
getString()
protected
getString(mixed $value) : string
Parameters
-
$value
: mixed
-
strlen()
protected
strlen(string $value) : int
Parameters
-
$value
: string
-
getColumnWidth()
private
getColumnWidth(array<string|int, mixed> $columnData) : int
Parameters
-
$columnData
: array<string|int, mixed>
-
getColumnWidths()
private
getColumnWidths() : array<string|int, mixed>
Return values
array<string|int, mixed>
renderCells()
private
renderCells(array<string|int, mixed> $rowData, array<string|int, mixed> $columnWidths) : void
Parameters
-
$rowData
: array<string|int, mixed>
-
-
$columnWidths
: array<string|int, mixed>
-
renderColumnHeader()
private
renderColumnHeader(int $maxRowLength, array<string|int, mixed> &$columnWidths) : void
Parameters
-
$maxRowLength
: int
-
-
$columnWidths
: array<string|int, mixed>
-
private
renderFooter(int $maxRowLength, array<string|int, mixed> $columnWidths) : void
Parameters
-
$maxRowLength
: int
-
-
$columnWidths
: array<string|int, mixed>
-
renderRows()
private
renderRows(int $maxRowLength, array<string|int, mixed> $columnWidths) : void
Parameters
-
$maxRowLength
: int
-
-
$columnWidths
: array<string|int, mixed>
-