1893. Class

1893.1. Zend\Text\Table\Column

Column class for ZendTextTableRow

1893.1.1. Methods

1893.1.1.1. __construct

__construct()

Create a column for a ZendTextTableRow object.

Parameters:
  • string – The content of the column
  • string – The align of the content
  • integer – The colspan of the column
  • string – The encoding of the content

1893.1.1.2. setContent

setContent()

Set the content.

If $charset is not defined, it is assumed that $content is encoded in the charset defined via ZendTextTable::setInputCharset() (defaults to utf-8).

Parameters:
  • string – Content of the column
  • string – The charset of the content
Throws ExceptionInvalidArgumentException:
 

When $content is not a string

Return type:

Column

1893.1.1.3. setAlign

setAlign()

Set the align

Parameters:string – Align of the column
Throws ExceptionOutOfBoundsException:
 When supplied align is invalid
Return type:Column

1893.1.1.4. setColSpan

setColSpan()

Set the colspan

Parameters:int
Throws ExceptionInvalidArgumentException:
 When $colSpan is smaller than 1
Return type:Column

1893.1.1.5. getColSpan

getColSpan()

Get the colspan

Return type:integer

1893.1.1.6. render

render()

Render the column width the given column width

Parameters:
  • integer – The width of the column
  • integer – The padding for the column
Throws ExceptionInvalidArgumentException:
 

When $columnWidth is lower than 1

Throws ExceptionOutOfBoundsException:
 

When padding is greater than columnWidth

Return type:

string

1893.1.2. Constants

1893.1.2.1. ALIGN_LEFT

Aligns for columns

1893.1.2.2. ALIGN_CENTER

1893.1.2.3. ALIGN_RIGHT