Class Sylar_SimpleTable

Description

SimpleData It's a standard Table. A simple table with some information about data contained It's used to swap data with databases by DataBase classes

the row must be an array indexed whit same header. For example

Table name: test

TbHeader: name surname phone email TbRow 0 Nik Mallet 090909 nik@nik.ir TbRow 1 Bob Bruk 0877689 bon@bob.com TbRow ... TbRow n Tim Ork 078 778 tim@tim.xx

Header info must be specified only one time and every row must be a Sylar_SimpleTableRow with an array

Located in /sylar/classes/common/data/SimpleTable.php (line 57)

Sylar_DataContainer
   |
   --Sylar_SimpleTable
Method Summary
 void __construct ([string $title = false], [string $id = false])
 void __destruct ()
 boolean addSimpleTableRow (Sylar_SimpleTableRow $tableRow)
 boolean fillDataFromArray (array $arrayData)
 void getColumns ()
 void getRowControls ()
 int getRows ()
 void getTableId ()
 void getTableTitle ()
 boolean hasRow ()
 void setColumns (mixed $colNum)
 void setColumnsHeader (Sylar_SimpleTableHeader $tbHeader)
 void setRowControls ([boolean $control = true])
 void setTableDescription (mixed $desc)
 void setTableId (mixed $id)
 void setTableTitle (mixed $titolo)
Methods
Constructor __construct (line 82)

Constructor it sets the main params of object. comprise ID and Title

void __construct ([string $title = false], [string $id = false])
  • string $title
  • string $id

Redefinition of:
Sylar_DataContainer::__construct()
Destructor __destruct (line 110)
void __destruct ()

Redefinition of:
Sylar_DataContainer::__destruct()
addSimpleTableRow (line 213)

Append row in table Row must be a Sylar_SimpleTableRow object, this method append it in the last position of table.

boolean addSimpleTableRow (Sylar_SimpleTableRow $tableRow)
fillDataFromArray (line 182)

Fill table data fill data in the object starting from array $arrayData it empty and reset the object data.

boolean fillDataFromArray (array $arrayData)
  • array $arrayData
getColumns (line 134)
  • access: public
void getColumns ()
getColumnsHeader (line 320)

Get Header Return an object that contain information about header of table

Sylar_SimpleTableHeader getColumnsHeader ()
getRow (line 241)

Get row from table Return the Object row containet at row $rowID. Return false on error

Sylar_SimpleTableRow getRow (int $rowID)
  • int $rowID
getRowControls (line 158)
  • access: public
void getRowControls ()
getRows (line 260)

Numer of table rows Return the number of rows contained in the table. Return false on error.

int getRows ()
getTableDescription (line 141)
  • access: public
void getTableDescription ()
getTableId (line 120)
  • access: public
void getTableId ()
getTableTitle (line 127)
  • access: public
void getTableTitle ()
hasRow (line 280)

Table has row? It controls if table has row, return true if rows is > 0 false otherwise

boolean hasRow ()
setColumns (line 131)
  • access: public
void setColumns (mixed $colNum)
setColumnsHeader (line 300)

Set the header of table Set the information about table header into Table object.

Usually the columnCode correspond to the column name in DB

void setColumnsHeader (Sylar_SimpleTableHeader $tbHeader)
setRowControls (line 155)

Set controls on every Row if set true the object controls the row befor insert else it try to insert directly.

void setRowControls ([boolean $control = true])
  • boolean $control
setTableDescription (line 138)
  • access: public
void setTableDescription (mixed $desc)
setTableId (line 117)
  • access: public
void setTableId (mixed $id)
setTableTitle (line 124)
  • access: public
void setTableTitle (mixed $titolo)

Inherited Methods

Inherited From Sylar_DataContainer

 Sylar_DataContainer::__construct()
 Sylar_DataContainer::__destruct()

Documentation generated on Thu, 24 Apr 2008 16:14:21 +0200 by phpDocumentor 1.3.0RC3