Cnz_Html
[ class tree: Cnz_Html ] [ index: Cnz_Html ] [ all elements ]

Class: Cnz_Html_Table

Source Location: /Html/Table.php

Class Overview

Cnz_Html_Element
   |
   --Cnz_Html_Table

HTML Table class


Implements interfaces:

  • Countable (internal interface)

Variables

Constants

Methods


Child classes:

Cnz_Html_Table_Csv
HTML Table Csv class
Cnz_Html_Table_Database
HTML Table Database class

Inherited Constants

Inherited Variables

Inherited Methods


Class Details

[line 94]
HTML Table class

If greenbar is true, the style suffix 'hilight' is used for even-numbered rows.

Example INI:


 [HtmlTable]
 greenbar                = true
 greenbarBandSize        = 2


 [HtmlTable-team : HtmlTable]
 caption = "The CF Demo Team"
 order   = number:desc

 column.1.name           = name
 column.1.heading        = Name

 column.2.name           = number
 column.2.heading        = Number
 column.2.align          = right
 column.2.type           = int

 column.3.name           = position
 column.3.heading        = Position


 [HtmlTable-directory : HtmlTable]
 from    = employee
 order   = name_last,name_first
 limit   = 8

 column.name.heading     = Name
 column.name.name        = name
 column.name.expression  = "name_first||' '||name_last"

 column.email.heading    = Email
 column.email.name       = email
 column.email.link       = mailto
 

Example PHP:

  1.  Cnz_Html::loadAndDisplay('Cnz_Html_Table_Csv'array('name' => 'team''filename' => 'table.ini''config' => true)'float:right;');
  2.  $teamTable->display();




[ Top ]


Class Variables

$buttonArray = array()

[line 111]



Tags:

access:  protected

Type:   array


[ Top ]

$columnArray = array()

[line 110]



Tags:

access:  protected

Type:   array


[ Top ]

$limit =  NULL

[line 117]



Tags:

access:  protected

Type:   int


[ Top ]

$offset =  0

[line 118]



Tags:

access:  protected

Type:   int


[ Top ]

$orderArray = array()

[line 113]



Tags:

access:  protected

Type:   array


[ Top ]

$pageCount =  0

[line 120]



Tags:

access:  protected

Type:   int


[ Top ]

$pageNumber =  0

[line 121]



Tags:

access:  protected

Type:   int


[ Top ]

$rowArray = array()

[line 112]



Tags:

access:  protected

Type:   array


[ Top ]

$rowCount =  0

[line 119]



Tags:

access:  protected

Type:   int


[ Top ]

$whereAdd =  NULL

[line 125]



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 187]

Cnz_Html_Table __construct( [ $options = array()])

Option fields: none

Configuration fields: caption greenbar greenbarBandSize limit order




Tags:

access:  public


Overridden in child classes as:

Cnz_Html_Table_Csv::__construct()
Option fields: none
Cnz_Html_Table_Database::__construct()
Option fields: none

Overrides Cnz_Html_Element::__construct() (Option fields:)

Parameters:

array   $options   Options

[ Top ]

method columnNameToNumber [line 324]

int columnNameToNumber( string $name)



Tags:

return:  Column number, or false on error
access:  protected


Parameters:

string   $name   Column name

[ Top ]

method count [line 340]

int count( )

Defined by the Countable interface



Tags:

access:  public



Implementation of:
Countable::count
[ Top ]

method display [line 243]

void display( [string $style = NULL])



Tags:

access:  public


Overrides Cnz_Html_Element::display() (parent method not documented)

Parameters:

string   $style   Value for outermost style attribute

[ Top ]

method genColumnNameArray [line 162]

array genColumnNameArray( )



Tags:

return:  Sequential array of column names
access:  protected


[ Top ]

method readData [line 316]

void readData( )



Tags:

access:  protected


Overridden in child classes as:

Cnz_Html_Table_Csv::readData()
Read table head and data from a CSV file into an array of table items. The column delimiter must be a comma, and the column enclosure character a double quotation mark.
Cnz_Html_Table_Database::readData()

[ Top ]

method setOrderBy [line 151]

void setOrderBy( string $order)



Tags:

access:  public


Parameters:

string   $order   New order

[ Top ]


Class Constants

BUTTON_PREFIX =  'button'

[line 98]


[ Top ]

COLUMN_PREFIX =  'column'

[line 99]


[ Top ]

DEFAULT_LIMIT =  24

[line 101]


[ Top ]

FIRST_BUTTON =  'first.png'

[line 102]


[ Top ]

HAS_CONFIG =  true

[line 96]


[ Top ]

ITEM_PREFIX =  'item'

[line 100]


[ Top ]

LAST_BUTTON =  'last.png'

[line 103]


[ Top ]

NEXT_BUTTON =  'next.png'

[line 104]


[ Top ]

ORDER_ASC =  'asc'

[line 106]


[ Top ]

ORDER_DESC =  'desc'

[line 107]


[ Top ]

PREFIX =  'HtmlTable'

[line 97]


[ Top ]

PREV_BUTTON =  'prev.png'

[line 105]


[ Top ]



Documentation generated on Thu, 19 Jul 2007 15:02:16 -0400 by phpDocumentor 1.4.0RC2