TableStyle
in package
Defines the styles for a Table.
Tags
Table of Contents
Properties
- $borderFormat : string
- $cellHeaderFormat : string
- $cellRowContentFormat : string
- $cellRowFormat : string
- $crossingBottomLeftChar : string
- $crossingBottomMidChar : string
- $crossingBottomRightChar : string
- $crossingChar : string
- $crossingMidLeftChar : string
- $crossingMidRightChar : string
- $crossingTopLeftBottomChar : string
- $crossingTopLeftChar : string
- $crossingTopMidBottomChar : string
- $crossingTopMidChar : string
- $crossingTopRightBottomChar : string
- $crossingTopRightChar : string
- $footerTitleFormat : string
- $headerTitleFormat : string
- $horizontalInsideBorderChar : string
- $horizontalOutsideBorderChar : string
- $paddingChar : string
- $padType : int
- $verticalInsideBorderChar : string
- $verticalOutsideBorderChar : string
Methods
- getBorderFormat() : string
- Gets table border format.
- getCellHeaderFormat() : string
- Gets header cell format.
- getCellRowContentFormat() : string
- Gets row cell content format.
- getCellRowFormat() : string
- Gets row cell format.
- getCrossingChar() : string
- Gets crossing character.
- getFooterTitleFormat() : string
- getHeaderTitleFormat() : string
- getPaddingChar() : string
- Gets padding character, used for cell padding.
- getPadType() : int
- Gets cell padding type.
- setBorderFormat() : $this
- Sets table border format.
- setCellHeaderFormat() : $this
- Sets header cell format.
- setCellRowContentFormat() : $this
- Sets row cell content format.
- setCellRowFormat() : $this
- Sets row cell format.
- setCrossingChars() : $this
- Sets crossing characters.
- setDefaultCrossingChar() : self
- Sets default crossing character used for each cross.
- setFooterTitleFormat() : $this
- setHeaderTitleFormat() : $this
- setHorizontalBorderChars() : $this
- Sets horizontal border characters.
- setPaddingChar() : $this
- Sets padding character, used for cell padding.
- setPadType() : $this
- Sets cell padding type.
- setVerticalBorderChars() : $this
- Sets vertical border characters.
Properties
$borderFormat
private
string
$borderFormat
= '%s'
$cellHeaderFormat
private
string
$cellHeaderFormat
= '<info>%s</info>'
$cellRowContentFormat
private
string
$cellRowContentFormat
= ' %s '
$cellRowFormat
private
string
$cellRowFormat
= '%s'
$crossingBottomLeftChar
private
string
$crossingBottomLeftChar
= '+'
$crossingBottomMidChar
private
string
$crossingBottomMidChar
= '+'
$crossingBottomRightChar
private
string
$crossingBottomRightChar
= '+'
$crossingChar
private
string
$crossingChar
= '+'
$crossingMidLeftChar
private
string
$crossingMidLeftChar
= '+'
$crossingMidRightChar
private
string
$crossingMidRightChar
= '+'
$crossingTopLeftBottomChar
private
string
$crossingTopLeftBottomChar
= '+'
$crossingTopLeftChar
private
string
$crossingTopLeftChar
= '+'
$crossingTopMidBottomChar
private
string
$crossingTopMidBottomChar
= '+'
$crossingTopMidChar
private
string
$crossingTopMidChar
= '+'
$crossingTopRightBottomChar
private
string
$crossingTopRightBottomChar
= '+'
$crossingTopRightChar
private
string
$crossingTopRightChar
= '+'
$footerTitleFormat
private
string
$footerTitleFormat
= '<fg=black;bg=white;options=bold> %s </>'
$headerTitleFormat
private
string
$headerTitleFormat
= '<fg=black;bg=white;options=bold> %s </>'
$horizontalInsideBorderChar
private
string
$horizontalInsideBorderChar
= '-'
$horizontalOutsideBorderChar
private
string
$horizontalOutsideBorderChar
= '-'
$paddingChar
private
string
$paddingChar
= ' '
$padType
private
int
$padType
= \STR_PAD_RIGHT
$verticalInsideBorderChar
private
string
$verticalInsideBorderChar
= '|'
$verticalOutsideBorderChar
private
string
$verticalOutsideBorderChar
= '|'
Methods
getBorderFormat()
Gets table border format.
public
getBorderFormat() : string
Return values
stringgetCellHeaderFormat()
Gets header cell format.
public
getCellHeaderFormat() : string
Return values
stringgetCellRowContentFormat()
Gets row cell content format.
public
getCellRowContentFormat() : string
Return values
stringgetCellRowFormat()
Gets row cell format.
public
getCellRowFormat() : string
Return values
stringgetCrossingChar()
Gets crossing character.
public
getCrossingChar() : string
Return values
stringgetFooterTitleFormat()
public
getFooterTitleFormat() : string
Return values
stringgetHeaderTitleFormat()
public
getHeaderTitleFormat() : string
Return values
stringgetPaddingChar()
Gets padding character, used for cell padding.
public
getPaddingChar() : string
Return values
stringgetPadType()
Gets cell padding type.
public
getPadType() : int
Return values
intsetBorderFormat()
Sets table border format.
public
setBorderFormat(string $borderFormat) : $this
Parameters
- $borderFormat : string
Return values
$thissetCellHeaderFormat()
Sets header cell format.
public
setCellHeaderFormat(string $cellHeaderFormat) : $this
Parameters
- $cellHeaderFormat : string
Return values
$thissetCellRowContentFormat()
Sets row cell content format.
public
setCellRowContentFormat(string $cellRowContentFormat) : $this
Parameters
- $cellRowContentFormat : string
Return values
$thissetCellRowFormat()
Sets row cell format.
public
setCellRowFormat(string $cellRowFormat) : $this
Parameters
- $cellRowFormat : string
Return values
$thissetCrossingChars()
Sets crossing characters.
public
setCrossingChars(string $cross, string $topLeft, string $topMid, string $topRight, string $midRight, string $bottomRight, string $bottomMid, string $bottomLeft, string $midLeft[, string|null $topLeftBottom = null ][, string|null $topMidBottom = null ][, string|null $topRightBottom = null ]) : $this
Example:
1═══════════════2══════════════════════════2══════════════════3
║ ISBN │ Title │ Author ║
8'══════════════0'═════════════════════════0'═════════════════4'
║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
8───────────────0──────────────────────────0──────────────────4
║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
7═══════════════6══════════════════════════6══════════════════5
Parameters
- $cross : string
-
Crossing char (see #0 of example)
- $topLeft : string
-
Top left char (see #1 of example)
- $topMid : string
-
Top mid char (see #2 of example)
- $topRight : string
-
Top right char (see #3 of example)
- $midRight : string
-
Mid right char (see #4 of example)
- $bottomRight : string
-
Bottom right char (see #5 of example)
- $bottomMid : string
-
Bottom mid char (see #6 of example)
- $bottomLeft : string
-
Bottom left char (see #7 of example)
- $midLeft : string
-
Mid left char (see #8 of example)
- $topLeftBottom : string|null = null
-
Top left bottom char (see #8' of example), equals to $midLeft if null
- $topMidBottom : string|null = null
-
Top mid bottom char (see #0' of example), equals to $cross if null
- $topRightBottom : string|null = null
-
Top right bottom char (see #4' of example), equals to $midRight if null
Return values
$thissetDefaultCrossingChar()
Sets default crossing character used for each cross.
public
setDefaultCrossingChar(string $char) : self
Parameters
- $char : string
Tags
Return values
selfsetFooterTitleFormat()
public
setFooterTitleFormat(string $format) : $this
Parameters
- $format : string
Return values
$thissetHeaderTitleFormat()
public
setHeaderTitleFormat(string $format) : $this
Parameters
- $format : string
Return values
$thissetHorizontalBorderChars()
Sets horizontal border characters.
public
setHorizontalBorderChars(string $outside[, string|null $inside = null ]) : $this
╔═══════════════╤══════════════════════════╤══════════════════╗
1 ISBN 2 Title │ Author ║
╠═══════════════╪══════════════════════════╪══════════════════╣
║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
╚═══════════════╧══════════════════════════╧══════════════════╝
Parameters
- $outside : string
- $inside : string|null = null
Return values
$thissetPaddingChar()
Sets padding character, used for cell padding.
public
setPaddingChar(string $paddingChar) : $this
Parameters
- $paddingChar : string
Return values
$thissetPadType()
Sets cell padding type.
public
setPadType(int $padType) : $this
Parameters
- $padType : int
Return values
$thissetVerticalBorderChars()
Sets vertical border characters.
public
setVerticalBorderChars(string $outside[, string|null $inside = null ]) : $this
╔═══════════════╤══════════════════════════╤══════════════════╗
║ ISBN │ Title │ Author ║
╠═══════1═══════╪══════════════════════════╪══════════════════╣
║ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri ║
║ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens ║
╟───────2───────┼──────────────────────────┼──────────────────╢
║ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien ║
║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
╚═══════════════╧══════════════════════════╧══════════════════╝
Parameters
- $outside : string
- $inside : string|null = null