Class miTable

Description

Manage the representation in table format of data, which is read from miSqlRecordset object

  • copyright: Copyright (c) 2003-2007 Mirchev Ideas Ltd. All rights reserved.

Located in /view/Table.php (line 16)


	
			
Variable Summary
Method Summary
static void escapeAndAssignArray (object &$t, array $values)
static array escapeArray (array $values)
miTable __construct ( &$recordset, object $recordset)
void addMainPageElements (array $mainPageElements)
void addMainUiElements ( &$t, object $t)
void addTableFeature (object $tableFeature)
void addUiElements ( &$rows, array $rows)
void assign (string $name, mixed $value)
void assignFeatureValues ($t &$t)
array getFeatureValues ()
void &getRecordset ()
array getState ()
string paramsArrayToUrl (array $params)
void parse (string $templateFilename)
void setMainPageElements (array $mainPageElements)
void setState (array $state)
void showPage (string $mainTemplate)
void updateState ()
Variables
mixed $_mainPageElements = array() (line 28)
  • access: protected
mixed $_messageObj = null (line 40)

Reference to the message object, or null

  • access: protected
mixed $_recordset (line 22)
  • access: protected
array $_state = array() (line 45)
  • var: hash with the current state
  • access: protected
array $_tableFeatures = array() (line 35)
  • var: with the miTableFeature-extending objects
  • access: protected
Methods
static method escapeAndAssignArray (line 273)

Escapes and assigns values

  • access: public
static void escapeAndAssignArray (object &$t, array $values)
  • array $values
  • object &$t
static method escapeArray (line 285)

Escapes the values in the array

  • return: the escaped array
  • access: public
static array escapeArray (array $values)
  • array $values: array withe values to be escaped
Constructor __construct (line 62)

miTable constructor. It takes one parameter - object of class miSqlRecordset or its subclasses

Example:

  1.  <?php
  2.  $recordset new miSqlRecordset('tableName');
  3.  $table new miTable($recordset);
  4.  ?>

  • access: public
miTable __construct ( &$recordset, object $recordset)
  • object $recordset: object of class miSqlRecordset or its subclasses
  • &$recordset
addMainPageElements (line 131)

Add main page elements

  • access: public
void addMainPageElements (array $mainPageElements)
  • array $mainPageElements: array with the main page elements
addMainUiElements (line 327)

In this function subclasses will add specific elements to the main template page

  • access: protected
void addMainUiElements ( &$t, object $t)
  • object $t: of class miTemplateParser() or its subclasses
  • &$t
addTableFeature (line 73)

Adds a table feature

  • access: public
void addTableFeature (object $tableFeature)
  • object $tableFeature
addUiElements (line 314)

In this function subclasses will add table specific processing

  • access: protected
void addUiElements ( &$rows, array $rows)
  • array $rows: readed rows from the database
  • &$rows
assign (line 303)

Assigns a value to a specify main page element

  • access: public
void assign (string $name, mixed $value)
  • string $name: name of the main page element
  • mixed $value: value of the main page element
assignFeatureValues (line 240)

Assign all table feature values to the template

  • access: public
void assignFeatureValues ($t &$t)
  • $t &$t: miTemplateParser
getFeatureValues (line 219)

Get all table feature values

  • access: public
array getFeatureValues ()
getMessageObj (line 205)

Returns the message object if $this->_messageObj is null creates new miMessage object

  • return: the message object
  • access: protected
miMessage getMessageObj ()
getRecordset (line 81)

Retrieves the recordset object

  • access: public
void &getRecordset ()
getState (line 141)

Return the state

  • access: public
array getState ()
getTableFeaturesStateParams (line 90)

Returns the params saving the state of all table features

  • access: public
void getTableFeaturesStateParams ()
paramsArrayToUrl (line 105)

Converts an associative array of params into url string

string paramsArrayToUrl (array $params)
  • array $params
parse (line 175)

Build webform Html using the template file

  • access: public
void parse (string $templateFilename)
  • string $templateFilename: name of the template file
setMainPageElements (line 120)

Sets main page elements

  • access: public
void setMainPageElements (array $mainPageElements)
  • array $mainPageElements: array with the main page elements
setState (line 151)

Set the state

  • access: public
void setState (array $state)
  • array $state
showPage (line 261)

Shows the table using the specified template

Example:

  1.  <?php
  2.  $recordset new miSqlRecordset('tableName');
  3.  $table new miTable($recordset);
  4.  $table->showPage($mainTemplate)
  5.  ?>

  • access: public
void showPage (string $mainTemplate)
  • string $mainTemplate: name of the main template file
updateState (line 160)

Updates the current state.

The new state is retrieved from the table features

  • access: public
void updateState ()

Documentation generated on Thu, 08 May 2008 16:57:43 +0300 by phpDocumentor 1.4.1