Overview

Namespaces

  • LucidFrame
    • Console
    • Core
    • File
  • None

Classes

  • Command
  • Console
  • ConsoleTable

Interfaces

  • CommandInterface
  • Overview
  • Namespace
  • Class

Class ConsoleTable

The class makes you easy to build console style tables

Namespace: LucidFrame\Console
Located at classes/console/ConsoleTable.php
Methods summary
public object
# addHeader( mixed $content = '' )

Adds a column to the table header

Adds a column to the table header

Parameters

$content
cell content

Returns

object
LucidFrame\Console\ConsoleTable
public object
# setHeaders( array $content )

Set headers for the columns in one-line

Set headers for the columns in one-line

Parameters

$content
of header cell content

Returns

object
LucidFrame\Console\ConsoleTable
public
# getHeaders( )

Get the row of header

Get the row of header

public object
# addRow( array $data = null )

Adds a row to the table

Adds a row to the table

Parameters

$data
The row data to add

Returns

object
LucidFrame\Console\ConsoleTable
public object
# addColumn( mixed $content, integer $col = null, integer $row = null )

Adds a column to the table

Adds a column to the table

Parameters

$content
The data of the column
$col
The column index to populate
$row
If starting row is not zero, specify it here

Returns

object
LucidFrame\Console\ConsoleTable
public object
# showBorder( )

Show table border

Show table border

Returns

object
LucidFrame\Console\ConsoleTable
public object
# hideBorder( )

Hide table border

Hide table border

Returns

object
LucidFrame\Console\ConsoleTable
public object
# showAllBorders( )

Show all table borders

Show all table borders

Returns

object
LucidFrame\Console\ConsoleTable
public object
# setPadding( integer $value = 1 )

Set padding for each cell

Set padding for each cell

Parameters

$value
The integer value, defaults to 1

Returns

object
LucidFrame\Console\ConsoleTable
public object
# setIndent( integer $value = 0 )

Set left indentation for the table

Set left indentation for the table

Parameters

$value
The integer value, defaults to 1

Returns

object
LucidFrame\Console\ConsoleTable
public object
# addBorderLine( )

Add horizontal border line

Add horizontal border line

Returns

object
LucidFrame\Console\ConsoleTable
public
# display( )

Print the table

Print the table

public string
# getTable( )

Get the printable table content

Get the printable table content

Returns

string
Constants summary
integer HEADER_INDEX
# -1
string HR
# 'HR'
Properties summary
protected array $data

Array of table data

Array of table data

# array()
protected boolean $border

Border shown or not

Border shown or not

# true
protected boolean $allBorders

All borders shown or not

All borders shown or not

# false
protected integer $padding

Table padding

Table padding

# 1
protected integer $indent

Table left margin

Table left margin

# 0
PHPLucidFrame 3.2 API documentation generated by ApiGen