PHP Class Webmozart\Console\UI\Style\GridStyle

Since: 1.0
Author: Bernhard Schussek ([email protected])
Show file Open project: webmozart/console Class Usage Examples

Public Methods

Method Description
asciiBorder ( ) : GridStyle A style that uses ASCII characters for drawing borders.
borderless ( ) : GridStyle A borderless style.
getBorderStyle ( ) : BorderStyle Returns the border style.
getCellAlignment ( ) : integer Returns the cell alignment.
getCellFormat ( ) : string Returns the format string for rendering cells.
getCellStyle ( ) : Style Returns the style of the grid cells.
getPaddingChar ( ) : string Returns the character used to pad cells to the desired width.
setBorderStyle ( BorderStyle $borderStyle ) : static Sets the border style.
setCellAlignment ( integer $alignment ) : static Sets the cell alignment.
setCellFormat ( string $format ) : static Sets the format string for rendering cells.
setCellStyle ( Style $style ) : static Sets the style of the grid cells.
setPaddingChar ( string $char ) : static Sets the character used to pad cells to the desired width.
solidBorder ( ) : GridStyle A style that uses Unicode characters for drawing solid borders.

Method Details

asciiBorder() public static method

A style that uses ASCII characters for drawing borders.
public static asciiBorder ( ) : GridStyle
return GridStyle The style.

borderless() public static method

A borderless style.
public static borderless ( ) : GridStyle
return GridStyle The style.

getBorderStyle() public method

Returns the border style.
public getBorderStyle ( ) : BorderStyle
return BorderStyle The border style.

getCellAlignment() public method

Returns the cell alignment.
public getCellAlignment ( ) : integer
return integer One of the {@link Alignment} constants.

getCellFormat() public method

Returns the format string for rendering cells.
public getCellFormat ( ) : string
return string The format string. The string contains the substring "%s" where the cell content is inserted.

getCellStyle() public method

Returns the style of the grid cells.
public getCellStyle ( ) : Style
return Webmozart\Console\Api\Formatter\Style The cell style.

getPaddingChar() public method

Returns the character used to pad cells to the desired width.
public getPaddingChar ( ) : string
return string The padding character.

setBorderStyle() public method

Sets the border style.
public setBorderStyle ( BorderStyle $borderStyle ) : static
$borderStyle BorderStyle The border style.
return static The current instance.

setCellAlignment() public method

Sets the cell alignment.
public setCellAlignment ( integer $alignment ) : static
$alignment integer One of the {@link Alignment} constants.
return static The current instance.

setCellFormat() public method

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.
return static The current instance.

setCellStyle() public method

Sets the style of the grid cells.
public setCellStyle ( Style $style ) : static
$style Webmozart\Console\Api\Formatter\Style The cell style.
return static The current instance.

setPaddingChar() public method

Sets the character used to pad cells to the desired width.
public setPaddingChar ( string $char ) : static
$char string The padding character.
return static The current instance.

solidBorder() public static method

A style that uses Unicode characters for drawing solid borders.
public static solidBorder ( ) : GridStyle
return GridStyle The style.