| Methods |
public
static
|
table(array $columnNames = [], array $rowsData = []): string
Turns some data into a table.
Turns some data into a table.
Parameters
| $columnNames |
Either a list of column names or an array of column names as keys and column widths as values.
|
| $rowsData |
A list containing row information, each row information is a list of strings to put into the table cells.
|
Returns
|
#
|
public
static
|
stringLengthLimit(string $string, integer $length): string
Limits the length of a string, if the string is over the given length, the string will be cut off at -2 length and haveā¦
Limits the length of a string, if the string is over the given length, the string will be cut off at -2 length and have ".." added so the total length is the given length.
Parameters
| $string |
The string to be limited.
|
| $length |
The desired length.
|
Returns
|
#
|
public
static
|
tableRow(array $data, array $columnWidths = []): string
Takes in a row of information and turns it into a string representing the row.
Takes in a row of information and turns it into a string representing the row.
Parameters
| $data |
Either a list of values to be put into the table, or an array where the keys are the values to put into the table and the values are the width of the columns.
|
| $columnWidths |
A list of column widths, only used when $data is a list.
|
|
#
|
public
static
|
tableLine(integer $width): string
Generates a horizontal table seperator.
Generates a horizontal table seperator.
Parameters
| $width |
The width of the table.
|
Returns
|
#
|