Overview

Namespaces

  • Webmozart
    • Console
      • Adapter
      • Api
        • Application
        • Args
          • Format
        • Command
        • Config
        • Event
        • Formatter
        • IO
        • Resolver
      • Args
      • Config
      • Formatter
      • Handler
        • Help
      • IO
        • InputStream
        • OutputStream
      • Process
      • Resolver
      • UI
        • Alignment
        • Component
        • Help
        • Layout
        • Style
      • Util

Classes

  • Alignment
  • BorderStyle
  • GridStyle
  • TableStyle
  • Overview
  • Namespace
  • Class

Class TableStyle

Defines the style of a Table.

Namespace: Webmozart\Console\UI\Style
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at UI/Style/TableStyle.php
Methods summary
public static Webmozart\Console\UI\Style\TableStyle
# borderless( )

A borderless style.

A borderless style.

Returns

Webmozart\Console\UI\Style\TableStyle
The style.
public static Webmozart\Console\UI\Style\TableStyle
# asciiBorder( )

A style that uses ASCII characters for drawing borders.

A style that uses ASCII characters for drawing borders.

Returns

Webmozart\Console\UI\Style\TableStyle
The style.
public static Webmozart\Console\UI\Style\TableStyle
# solidBorder( )

A style that uses Unicode characters for drawing solid borders.

A style that uses Unicode characters for drawing solid borders.

Returns

Webmozart\Console\UI\Style\TableStyle
The style.
public string
# getPaddingChar( )

Returns the character used to pad cells to the desired width.

Returns the character used to pad cells to the desired width.

Returns

string
The padding character.
public static
# setPaddingChar( string $char )

Sets the character used to pad cells to the desired width.

Sets the character used to pad cells to the desired width.

Parameters

$char
The padding character.

Returns

static
The current instance.
public string
# getHeaderCellFormat( )

Returns the format string for rendering the header cells.

Returns the format string for rendering the header cells.

Returns

string

The format string. The string contains the substring "%s" where the cell content is inserted.

public static
# setHeaderCellFormat( string $format )

Sets the format string for rendering the header cells.

Sets the format string for rendering the header cells.

Parameters

$format

The format string. The string should contain the substring "%s" where the cell content is inserted.

Returns

static
The current instance.
public string
# getCellFormat( )

Returns the format string for rendering cells.

Returns the format string for rendering cells.

Returns

string

The format string. The string contains the substring "%s" where the cell content is inserted.

public static
# setCellFormat( string $format )

Sets the format string for rendering cells.

Sets the format string for rendering cells.

Parameters

$format

The format string. The string should contain the substring "%s" where the cell content is inserted.

Returns

static
The current instance.
public int[]
# getColumnAlignments( integer $nbColumns )

Returns the alignments of the table columns.

Returns the alignments of the table columns.

Parameters

$nbColumns
The number of alignments to return.

Returns

int[]

An array of Webmozart\Console\UI\Style\Alignment constants indexed by the 0-based column keys.

public integer
# getColumnAlignment( integer $column )

Returns the alignment of a given column.

Returns the alignment of a given column.

Parameters

$column
The 0-based column key.

Returns

integer
The Webmozart\Console\UI\Style\Alignment constant.
public static
# setColumnAlignments( array $alignments )

Sets the alignments of the table columns.

Sets the alignments of the table columns.

Parameters

$alignments

An array of Webmozart\Console\UI\Style\Alignment constants indexed by the 0-based column keys.

Returns

static
The current instance.
public static
# setColumnAlignment( integer $column, integer $alignment )

Sets the alignment of a given column.

Sets the alignment of a given column.

Parameters

$column
The 0-based column key.
$alignment
The alignment.

Returns

static
The current instance.
public integer
# getDefaultColumnAlignment( )

Returns the default column alignment.

Returns the default column alignment.

Returns

integer
One of the Webmozart\Console\UI\Style\Alignment constants.
public static
# setDefaultColumnAlignment( integer $alignment )

Returns the default column alignment.

Returns the default column alignment.

Parameters

$alignment
One of the Webmozart\Console\UI\Style\Alignment constants.

Returns

static
The current instance.
public Webmozart\Console\UI\Style\BorderStyle
# getBorderStyle( )

Returns the border style.

Returns the border style.

Returns

Webmozart\Console\UI\Style\BorderStyle
The border style.
public static
# setBorderStyle( Webmozart\Console\UI\Style\BorderStyle $borderStyle )

Sets the border style.

Sets the border style.

Parameters

$borderStyle
The border style.

Returns

static
The current instance.
public Webmozart\Console\Api\Formatter\Style
# getHeaderCellStyle( )

Returns the style of the header cells.

Returns the style of the header cells.

Returns

Webmozart\Console\Api\Formatter\Style
The header cell style.
public static
# setHeaderCellStyle( Webmozart\Console\Api\Formatter\Style $style = null )

Sets the style of the header cells.

Sets the style of the header cells.

Parameters

$style
The header cell style.

Returns

static
The current instance.
public Webmozart\Console\Api\Formatter\Style
# getCellStyle( )

Returns the style of the table cells.

Returns the style of the table cells.

Returns

Webmozart\Console\Api\Formatter\Style
The cell style.
public static
# setCellStyle( Webmozart\Console\Api\Formatter\Style $style )

Sets the style of the table cells.

Sets the style of the table cells.

Parameters

$style
The cell style.

Returns

static
The current instance.
Webmozart Console API API documentation generated by ApiGen