PHP Класс Webmozart\Console\UI\Style\TableStyle

С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
asciiBorder ( ) : TableStyle A style that uses ASCII characters for drawing borders.
borderless ( ) : TableStyle A borderless style.
getBorderStyle ( ) : BorderStyle Returns the border style.
getCellFormat ( ) : string Returns the format string for rendering cells.
getCellStyle ( ) : Style Returns the style of the table cells.
getColumnAlignment ( integer $column ) : integer Returns the alignment of a given column.
getColumnAlignments ( integer $nbColumns ) : int[] Returns the alignments of the table columns.
getDefaultColumnAlignment ( ) : integer Returns the default column alignment.
getHeaderCellFormat ( ) : string Returns the format string for rendering the header cells.
getHeaderCellStyle ( ) : Style Returns the style of the header cells.
getPaddingChar ( ) : string Returns the character used to pad cells to the desired width.
setBorderStyle ( BorderStyle $borderStyle ) : static Sets the border style.
setCellFormat ( string $format ) : static Sets the format string for rendering cells.
setCellStyle ( Style $style ) : static Sets the style of the table cells.
setColumnAlignment ( integer $column, integer $alignment ) : static Sets the alignment of a given column.
setColumnAlignments ( array $alignments ) : static Sets the alignments of the table columns.
setDefaultColumnAlignment ( integer $alignment ) : static Returns the default column alignment.
setHeaderCellFormat ( string $format ) : static Sets the format string for rendering the header cells.
setHeaderCellStyle ( Style $style = null ) : static Sets the style of the header cells.
setPaddingChar ( string $char ) : static Sets the character used to pad cells to the desired width.
solidBorder ( ) : TableStyle A style that uses Unicode characters for drawing solid borders.

Описание методов

asciiBorder() публичный статический Метод

A style that uses ASCII characters for drawing borders.
public static asciiBorder ( ) : TableStyle
Результат TableStyle The style.

borderless() публичный статический Метод

A borderless style.
public static borderless ( ) : TableStyle
Результат TableStyle The style.

getBorderStyle() публичный Метод

Returns the border style.
public getBorderStyle ( ) : BorderStyle
Результат BorderStyle The border style.

getCellFormat() публичный Метод

Returns the format string for rendering cells.
public getCellFormat ( ) : string
Результат string The format string. The string contains the substring "%s" where the cell content is inserted.

getCellStyle() публичный Метод

Returns the style of the table cells.
public getCellStyle ( ) : Style
Результат Webmozart\Console\Api\Formatter\Style The cell style.

getColumnAlignment() публичный Метод

Returns the alignment of a given column.
public getColumnAlignment ( integer $column ) : integer
$column integer The 0-based column key.
Результат integer The {@link Alignment} constant.

getColumnAlignments() публичный Метод

Returns the alignments of the table columns.
public getColumnAlignments ( integer $nbColumns ) : int[]
$nbColumns integer The number of alignments to return.
Результат int[] An array of {@link Alignment} constants indexed by the 0-based column keys.

getDefaultColumnAlignment() публичный Метод

Returns the default column alignment.
public getDefaultColumnAlignment ( ) : integer
Результат integer One of the {@link Alignment} constants.

getHeaderCellFormat() публичный Метод

Returns the format string for rendering the header cells.
public getHeaderCellFormat ( ) : string
Результат string The format string. The string contains the substring "%s" where the cell content is inserted.

getHeaderCellStyle() публичный Метод

Returns the style of the header cells.
public getHeaderCellStyle ( ) : Style
Результат Webmozart\Console\Api\Formatter\Style The header cell style.

getPaddingChar() публичный Метод

Returns the character used to pad cells to the desired width.
public getPaddingChar ( ) : string
Результат string The padding character.

setBorderStyle() публичный Метод

Sets the border style.
public setBorderStyle ( BorderStyle $borderStyle ) : static
$borderStyle BorderStyle The border style.
Результат static The current instance.

setCellFormat() публичный Метод

Sets the format string for rendering cells.
public setCellFormat ( string $format ) : static
$format string The format string. The string should contain the substring "%s" where the cell content is inserted.
Результат static The current instance.

setCellStyle() публичный Метод

Sets the style of the table cells.
public setCellStyle ( Style $style ) : static
$style Webmozart\Console\Api\Formatter\Style The cell style.
Результат static The current instance.

setColumnAlignment() публичный Метод

Sets the alignment of a given column.
public setColumnAlignment ( integer $column, integer $alignment ) : static
$column integer The 0-based column key.
$alignment integer The alignment.
Результат static The current instance.

setColumnAlignments() публичный Метод

Sets the alignments of the table columns.
public setColumnAlignments ( array $alignments ) : static
$alignments array An array of {@link Alignment} constants indexed by the 0-based column keys.
Результат static The current instance.

setDefaultColumnAlignment() публичный Метод

Returns the default column alignment.
public setDefaultColumnAlignment ( integer $alignment ) : static
$alignment integer One of the {@link Alignment} constants.
Результат static The current instance.

setHeaderCellFormat() публичный Метод

Sets the format string for rendering the header cells.
public setHeaderCellFormat ( string $format ) : static
$format string The format string. The string should contain the substring "%s" where the cell content is inserted.
Результат static The current instance.

setHeaderCellStyle() публичный Метод

Sets the style of the header cells.
public setHeaderCellStyle ( Style $style = null ) : static
$style Webmozart\Console\Api\Formatter\Style The header cell style.
Результат static The current instance.

setPaddingChar() публичный Метод

Sets the character used to pad cells to the desired width.
public setPaddingChar ( string $char ) : static
$char string The padding character.
Результат static The current instance.

solidBorder() публичный статический Метод

A style that uses Unicode characters for drawing solid borders.
public static solidBorder ( ) : TableStyle
Результат TableStyle The style.