|
Ubiquity 2.5.2
php rapid development framework
|
Public Member Functions | |
| setDatas ($datas) | |
| factorize () | |
| getTable () | |
| removeVGrid ($start=2) | |
| removeHGrid ($start=2) | |
| removeGrid ($hStart=2, $vStart=2) | |
| setPadding ($padding) | |
| setIndent ($indent) | |
| setBorderColor ($borderColor) | |
| setPreserveSpaceBefore ($preserveSpaceBefore) | |
| __toString () | |
Static Public Member Functions | |
| static | borderColor ($text, $color=ConsoleFormatter::LIGHT_GRAY) |
| Surround the text with a border of the specified color. | |
| static | borderType ($text, $type) |
| Surround the text with a border of the specified type. | |
| static | table (array $datas, $part=null) |
| Return a formated table for displaying the datas. | |
Data Fields | |
| const | TOP_LEFT = '╭' |
| const | TOP_RIGHT = '╮' |
| const | H_LINE = '─' |
| const | V_LINE = '│' |
| const | M_COL_TOP = '┬' |
| const | M_COL_ROW = '┼' |
| const | M_COL_BOTTOM = '┴' |
| const | M_ROW_LEFT = '├' |
| const | M_ROW_RIGHT = '┤' |
| const | BOTTOM_LEFT = '╰' |
| const | BOTTOM_RIGHT = '╯' |
| const | BINARY_VALUES |
Private Member Functions | |
| getCellOutput ($index, $row=null) | |
| Get the printable cell content. | |
| getVLine () | |
| initializeBorders () | |
| mb_str_pad ($str, $pad_len, $pad_str=' ', $dir=STR_PAD_RIGHT, $encoding=NULL) | |
| mb_str_pad version for multibyte encoding. | |
| getLineRow ($row, $yl) | |
| border ($row) | |
| getBorderValue ($row, $col) | |
| calculateColWidths () | |
| Calculate the maximum width of each column. | |
Private Attributes | |
| $h_lines = [] | |
| $v_lines = [] | |
| $datas | |
| $colWidths | |
| $rowHeight | |
| $colCount | |
| $rowCount | |
| $padding = 5 | |
| $indent = 0 | |
| $borderColor = ConsoleFormatter::LIGHT_GRAY | |
| $preserveSpaceBefore = false | |
Definition at line 6 of file ConsoleTable.php.
| __toString | ( | ) |
Definition at line 411 of file ConsoleTable.php.
|
private |
Definition at line 232 of file ConsoleTable.php.
|
static |
Surround the text with a border of the specified color.
| string | $text | |
| string | $color |
Definition at line 365 of file ConsoleTable.php.
|
static |
Surround the text with a border of the specified type.
| string | $text | |
| string | $type | one of error, success, info, warning |
Definition at line 382 of file ConsoleTable.php.
|
private |
Calculate the maximum width of each column.
Definition at line 292 of file ConsoleTable.php.
| factorize | ( | ) |
Definition at line 160 of file ConsoleTable.php.
|
private |
Definition at line 243 of file ConsoleTable.php.
|
private |
Get the printable cell content.
| integer | $index | The column index |
| array | $row | The table row |
Definition at line 75 of file ConsoleTable.php.
|
private |
Definition at line 178 of file ConsoleTable.php.
| getTable | ( | ) |
Definition at line 193 of file ConsoleTable.php.
|
private |
Definition at line 105 of file ConsoleTable.php.
|
private |
Definition at line 109 of file ConsoleTable.php.
|
private |
mb_str_pad version for multibyte encoding.
| string | $str | |
| int | $pad_len | |
| string | $pad_str | |
| string | $dir | |
| string | $encoding |
Definition at line 125 of file ConsoleTable.php.
| removeGrid | ( | $hStart = 2, |
|
$vStart = 2 |
|||
| ) |
Definition at line 227 of file ConsoleTable.php.
| removeHGrid | ( | $start = 2 | ) |
Definition at line 220 of file ConsoleTable.php.
| removeVGrid | ( | $start = 2 | ) |
Definition at line 214 of file ConsoleTable.php.
| setBorderColor | ( | $borderColor | ) |
| string | $borderColor |
Definition at line 354 of file ConsoleTable.php.
| setDatas | ( | $datas | ) |
Definition at line 153 of file ConsoleTable.php.
| setIndent | ( | $indent | ) |
| number | $indent |
Definition at line 346 of file ConsoleTable.php.
| setPadding | ( | $padding | ) |
| number | $padding |
Definition at line 338 of file ConsoleTable.php.
| setPreserveSpaceBefore | ( | $preserveSpaceBefore | ) |
| boolean | $preserveSpaceBefore |
Definition at line 407 of file ConsoleTable.php.
|
static |
Return a formated table for displaying the datas.
| array | $datas | |
| ?string | $part |
Definition at line 422 of file ConsoleTable.php.
|
private |
Definition at line 62 of file ConsoleTable.php.
|
private |
Definition at line 54 of file ConsoleTable.php.
|
private |
Definition at line 46 of file ConsoleTable.php.
|
private |
Definition at line 40 of file ConsoleTable.php.
|
private |
Definition at line 32 of file ConsoleTable.php.
|
private |
Definition at line 60 of file ConsoleTable.php.
|
private |
Definition at line 58 of file ConsoleTable.php.
|
private |
Definition at line 64 of file ConsoleTable.php.
|
private |
Definition at line 56 of file ConsoleTable.php.
|
private |
Definition at line 52 of file ConsoleTable.php.
|
private |
Definition at line 34 of file ConsoleTable.php.
| const BINARY_VALUES |
Definition at line 18 of file ConsoleTable.php.
| const BOTTOM_LEFT = '╰' |
Definition at line 16 of file ConsoleTable.php.
| const BOTTOM_RIGHT = '╯' |
Definition at line 16 of file ConsoleTable.php.
| const H_LINE = '─' |
Definition at line 10 of file ConsoleTable.php.
| const M_COL_BOTTOM = '┴' |
Definition at line 12 of file ConsoleTable.php.
| const M_COL_ROW = '┼' |
Definition at line 12 of file ConsoleTable.php.
| const M_COL_TOP = '┬' |
Definition at line 12 of file ConsoleTable.php.
| const M_ROW_LEFT = '├' |
Definition at line 14 of file ConsoleTable.php.
| const M_ROW_RIGHT = '┤' |
Definition at line 14 of file ConsoleTable.php.
| const TOP_LEFT = '╭' |
Definition at line 8 of file ConsoleTable.php.
| const TOP_RIGHT = '╮' |
Definition at line 8 of file ConsoleTable.php.
| const V_LINE = '│' |
Definition at line 10 of file ConsoleTable.php.