API Documentation

Text/Table.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Text_Table
version
$Id: Table.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Text_Table

Description

Zend Framework

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.

Zend_Text_Table

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Text_Table
Constants
AUTO_SEPARATE_NONE
AUTO_SEPARATE_HEADER
AUTO_SEPARATE_FOOTER
AUTO_SEPARATE_ALL
Properties
$_decorator
$_columnWidths
$_rows
$_autoSeparate
$_padding
$_defaultColumnAligns
$_pluginLoader
$_inputCharset
$_outputCharset
$_skipOptions
Methods
__construct
setOptions
setConfig
setColumnWidths
setAutoSeparate
setDecorator
setPadding
getPluginLoader
setDefaultColumnAlign
setInputCharset
getInputCharset
setOutputCharset
getOutputCharset
appendRow
render
__toString

Description

Zend_Text_Table enables developers to create tables out of characters

Constants

AUTO_SEPARATE_NONE

 AUTO_SEPARATE_NONE = '0x0'

Auto seperator settings

Details

value
0x0

AUTO_SEPARATE_HEADER

 AUTO_SEPARATE_HEADER = '0x1'

Details

value
0x1

AUTO_SEPARATE_FOOTER

 AUTO_SEPARATE_FOOTER = '0x2'

Details

value
0x2

AUTO_SEPARATE_ALL

 AUTO_SEPARATE_ALL = '0x4'

Details

value
0x4

Properties

$_autoSeparate

integer $_autoSeparate = 'self'

Auto separation mode

Details

$_autoSeparate
integer
visibility
protected
default
self
final
false
static
false

$_columnWidths

array $_columnWidths = 'null'

List of all column widths

Details

$_columnWidths
array
visibility
protected
default
null
final
false
static
false

$_decorator

Zend_Text_Table_Decorator_Interface $_decorator = 'null'

Decorator used for the table borders

Details

$_decorator
Zend_Text_Table_Decorator_Interface
visibility
protected
default
null
final
false
static
false

$_defaultColumnAligns

array $_defaultColumnAligns = 'array'

Default column aligns for rows created by appendRow(array $data)

Details

$_defaultColumnAligns
array
visibility
protected
default
array
final
false
static
false

$_inputCharset

string $_inputCharset = 'utf-8'

Charset which is used for input by default

Details

$_inputCharset
string
visibility
protected
default
utf-8
final
false
static
true

$_outputCharset

string $_outputCharset = 'utf-8'

Charset which is used internally

Details

$_outputCharset
string
visibility
protected
default
utf-8
final
false
static
true

$_padding

integer $_padding = '0'

Padding for columns

Details

$_padding
integer
visibility
protected
default
0
final
false
static
false

$_pluginLoader

string $_pluginLoader = 'null'

Plugin loader for decorators

Details

$_pluginLoader
string
visibility
protected
default
null
final
false
static
false

$_rows

array $_rows = 'array'

Rows of the table

Details

$_rows
array
visibility
protected
default
array
final
false
static
false

$_skipOptions

array $_skipOptions = 'array'

Option keys to skip when calling setOptions()

Details

$_skipOptions
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( Zend_Config|array $options = null ) :

Create a basic table object

Arguments
$options
Zend_Configarray
Configuration options
Details
visibility
public
final
false
static
false
throws
When no columns widths were set

__toString

__toString( ) : string

Magic method which returns the rendered table

Output
string
Details
visibility
public
final
false
static
false

appendRow

appendRow( array|Zend_Text_Table_Row $row ) : Zend_Text_Table

Append a row to the table

Arguments
$row
arrayZend_Text_Table_Row
The row to append to the table
Details
visibility
public
final
false
static
false
throws
When $row is neither an array nor Zend_Zext_Table_Row
throws
When a row contains too many columns

getInputCharset

getInputCharset( ) :

Get the input charset for column contents

Details
visibility
public
final
false
static
true

getOutputCharset

getOutputCharset( ) :

Get the output charset for column contents

Details
visibility
public
final
false
static
true

getPluginLoader

getPluginLoader( ) : Zend_Loader_PluginLoader

Get the plugin loader for decorators

Details
visibility
public
final
false
static
false

render

render( ) : string

Render the table

Output
string
Details
visibility
public
final
false
static
false
throws
When no rows were added to the table

setAutoSeparate

setAutoSeparate( integer $autoSeparate ) : Zend_Text_Table

Set auto separation mode

Arguments
$autoSeparate
integer
Auto separation mode
Details
visibility
public
final
false
static
false

setColumnWidths

setColumnWidths( array $columnWidths ) : Zend_Text_Table

Set column widths

Arguments
$columnWidths
array
Widths of all columns
Details
visibility
public
final
false
static
false
throws
When no columns were supplied
throws
When a column has an invalid width

setConfig

setConfig( Zend_Config $config ) : Zend_Text_Table

Set options from config object

Arguments
$config
Zend_Config
Configuration for Zend_Text_Table
Details
visibility
public
final
false
static
false

setDecorator

setDecorator( Zend_Text_Table_Decorator_Interface|string $decorator ) : Zend_Text_Table

Set decorator

Arguments
$decorator
Zend_Text_Table_Decorator_Interfacestring
Decorator to use
Details
visibility
public
final
false
static
false

setDefaultColumnAlign

setDefaultColumnAlign( integer $columnNum, string $align ) : Zend_Text_Table

Set default column align for rows created by appendRow(array $data)

Arguments
$columnNum
integer
$align
string
Details
visibility
public
final
false
static
false

setInputCharset

setInputCharset( string $charset ) :

Set the input charset for column contents

Arguments
$charset
string
Details
visibility
public
final
false
static
true

setOptions

setOptions( array $options ) : Zend_Text_Table

Set options from array

Arguments
$options
array
Configuration for Zend_Text_Table
Details
visibility
public
final
false
static
false

setOutputCharset

setOutputCharset( string $charset ) :

Set the output charset for column contents

Arguments
$charset
string
Details
visibility
public
final
false
static
true

setPadding

setPadding( integer $padding ) : Zend_Text_Table

Set the column padding

Arguments
$padding
integer
The padding for the columns
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.