Text/Table/Column.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Text_Table
- Version
- $Id: Column.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Text_Table_Column
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties

array $_allowedAligns = array(self::ALIGN_LEFT, self::ALIGN_CENTER, self::ALIGN_RIGHT)array(self::ALIGN_LEFT, self::ALIGN_CENTER, self::ALIGN_RIGHT)Details- Type
- array
Methods

__construct(string $content = null, string $align = null, integer $colSpan = null, string $charset = null) : voidCreate a column for a Zend_Text_Table_Row object.
| Name | Type | Description |
|---|---|---|
| $content | string | The content of the column |
| $align | string | The align of the content |
| $colSpan | integer | The colspan of the column |
| $charset | string | The encoding of the content |

render(integer $columnWidth, integer $padding = 0) : stringRender the column width the given column width
| Name | Type | Description |
|---|---|---|
| $columnWidth | integer | The width of the column |
| $padding | integer | The padding for the column |
| Type | Description |
|---|---|
| string |
| Exception | Description |
|---|---|
| \Zend_Text_Table_Exception | When $columnWidth is lower than 1 |
| \Zend_Text_Table_Exception | When padding is greater than columnWidth |

setAlign(string $align) : \Zend_Text_Table_ColumnSet the align
| Name | Type | Description |
|---|---|---|
| $align | string | Align of the column |
| Type | Description |
|---|---|
| \Zend_Text_Table_Column |
| Exception | Description |
|---|---|
| \Zend_Text_Table_Exception | When supplied align is invalid |

setColSpan(int $colSpan) : \Zend_Text_Table_ColumnSet the colspan
| Name | Type | Description |
|---|---|---|
| $colSpan | int |
| Type | Description |
|---|---|
| \Zend_Text_Table_Column |
| Exception | Description |
|---|---|
| \Zend_Text_Table_Exception | When $colSpan is smaller than 1 |

setContent(string $content, string $charset = null) : \Zend_Text_Table_ColumnSet the content.
If $charset is not defined, it is assumed that $content is encoded in the charset defined via Zend_Text_Table::setInputCharset() (defaults to utf-8).
| Name | Type | Description |
|---|---|---|
| $content | string | Content of the column |
| $charset | string | The charset of the content |
| Type | Description |
|---|---|
| \Zend_Text_Table_Column |
| Exception | Description |
|---|---|
| \Zend_Text_Table_Exception | When $content is not a string |