TableStyle
in package
Defines the styles for a Table.
Tags
Table of Contents
Properties
- $borderFormat : mixed
- $cellHeaderFormat : mixed
- $cellRowContentFormat : mixed
- $cellRowFormat : mixed
- $crossingBottomLeftChar : mixed
- $crossingBottomMidChar : mixed
- $crossingBottomRightChar : mixed
- $crossingChar : mixed
- $crossingMidLeftChar : mixed
- $crossingMidRightChar : mixed
- $crossingTopLeftBottomChar : mixed
- $crossingTopLeftChar : mixed
- $crossingTopMidBottomChar : mixed
- $crossingTopMidChar : mixed
- $crossingTopRightBottomChar : mixed
- $crossingTopRightChar : mixed
- $footerTitleFormat : mixed
- $headerTitleFormat : mixed
- $horizontalInsideBorderChar : mixed
- $horizontalOutsideBorderChar : mixed
- $paddingChar : mixed
- $padType : mixed
- $verticalInsideBorderChar : mixed
- $verticalOutsideBorderChar : mixed
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
- getHorizontalBorderChar() : string
- Gets horizontal border character.
- getPaddingChar() : string
- Gets padding character, used for cell padding.
- getPadType() : int
- Gets cell padding type.
- getVerticalBorderChar() : string
- Gets vertical border character.
- 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.
- setCrossingChar() : $this
- Sets crossing character.
- setCrossingChars() : self
- Sets crossing characters.
- setDefaultCrossingChar() : self
- Sets default crossing character used for each cross.
- setFooterTitleFormat() : self
- setHeaderTitleFormat() : self
- setHorizontalBorderChar() : $this
- Sets horizontal border character.
- setHorizontalBorderChars() : self
- Sets horizontal border characters.
- setPaddingChar() : $this
- Sets padding character, used for cell padding.
- setPadType() : $this
- Sets cell padding type.
- setVerticalBorderChar() : $this
- Sets vertical border character.
- setVerticalBorderChars() : self
- Sets vertical border characters.
Properties
$borderFormat
private
mixed
$borderFormat
= '%s'
$cellHeaderFormat
private
mixed
$cellHeaderFormat
= '<info>%s</info>'
$cellRowContentFormat
private
mixed
$cellRowContentFormat
= ' %s '
$cellRowFormat
private
mixed
$cellRowFormat
= '%s'
$crossingBottomLeftChar
private
mixed
$crossingBottomLeftChar
= '+'
$crossingBottomMidChar
private
mixed
$crossingBottomMidChar
= '+'
$crossingBottomRightChar
private
mixed
$crossingBottomRightChar
= '+'
$crossingChar
private
mixed
$crossingChar
= '+'
$crossingMidLeftChar
private
mixed
$crossingMidLeftChar
= '+'
$crossingMidRightChar
private
mixed
$crossingMidRightChar
= '+'
$crossingTopLeftBottomChar
private
mixed
$crossingTopLeftBottomChar
= '+'
$crossingTopLeftChar
private
mixed
$crossingTopLeftChar
= '+'
$crossingTopMidBottomChar
private
mixed
$crossingTopMidBottomChar
= '+'
$crossingTopMidChar
private
mixed
$crossingTopMidChar
= '+'
$crossingTopRightBottomChar
private
mixed
$crossingTopRightBottomChar
= '+'
$crossingTopRightChar
private
mixed
$crossingTopRightChar
= '+'
$footerTitleFormat
private
mixed
$footerTitleFormat
= '<fg=black;bg=white;options=bold> %s </>'
$headerTitleFormat
private
mixed
$headerTitleFormat
= '<fg=black;bg=white;options=bold> %s </>'
$horizontalInsideBorderChar
private
mixed
$horizontalInsideBorderChar
= '-'
$horizontalOutsideBorderChar
private
mixed
$horizontalOutsideBorderChar
= '-'
$paddingChar
private
mixed
$paddingChar
= ' '
$padType
private
mixed
$padType
= \STR_PAD_RIGHT
$verticalInsideBorderChar
private
mixed
$verticalInsideBorderChar
= '|'
$verticalOutsideBorderChar
private
mixed
$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
stringgetHorizontalBorderChar()
Gets horizontal border character.
public
getHorizontalBorderChar() : 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
intgetVerticalBorderChar()
Gets vertical border character.
public
getVerticalBorderChar() : string
Return values
stringsetBorderFormat()
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
$thissetCrossingChar()
Sets crossing character.
public
setCrossingChar(string $crossingChar) : $this
Parameters
- $crossingChar : 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 ]) : self
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
selfsetDefaultCrossingChar()
Sets default crossing character used for each cross.
public
setDefaultCrossingChar(string $char) : self
Parameters
- $char : string
Tags
Return values
selfsetFooterTitleFormat()
public
setFooterTitleFormat(string $format) : self
Parameters
- $format : string
Return values
selfsetHeaderTitleFormat()
public
setHeaderTitleFormat(string $format) : self
Parameters
- $format : string
Return values
selfsetHorizontalBorderChar()
Sets horizontal border character.
public
setHorizontalBorderChar(string $horizontalBorderChar) : $this
Parameters
- $horizontalBorderChar : string
Return values
$thissetHorizontalBorderChars()
Sets horizontal border characters.
public
setHorizontalBorderChars(string $outside[, string|null $inside = null ]) : self
╔═══════════════╤══════════════════════════╤══════════════════╗
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
-
Outside border char (see #1 of example)
- $inside : string|null = null
-
Inside border char (see #2 of example), equals $outside if null
Return values
selfsetPaddingChar()
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
-
STR_PAD_*
Return values
$thissetVerticalBorderChar()
Sets vertical border character.
public
setVerticalBorderChar(string $verticalBorderChar) : $this
Parameters
- $verticalBorderChar : string
Return values
$thissetVerticalBorderChars()
Sets vertical border characters.
public
setVerticalBorderChars(string $outside[, string|null $inside = null ]) : self
╔═══════════════╤══════════════════════════╤══════════════════╗
║ 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
-
Outside border char (see #1 of example)
- $inside : string|null = null
-
Inside border char (see #2 of example), equals $outside if null