phpDocumentor mvc
[ class tree: mvc ] [ index: mvc ] [ all elements ]

Class: ViewCommon

Source Location: /myphp-1.9/myphp-1.9-mvc/html/view/ViewCommon.php

Class ViewCommon

Class Overview

Generates the html for a Form or List View

  1. Usage:
  2. $view = new ViewCommon($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
  3. print $view->getHtml();
  4. Or
  5. ViewCommon::display($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
  6.  
  7. Generates a complete View Common interface
  8. +--------------------------------
  9. |>| Text header
  10. +--------------------------------
  11. | head1 | head2 | head3 | etc.
  12. +--------------------------------
  13. | dat_1 | dat_2 | dat_3 | etc.
  14. +--------------------------------

Located in /myphp-1.9/myphp-1.9-mvc/html/view/ViewCommon.php [line 50]

Object
   |
   --Html
      |
      --Table
         |
         --ViewCommon

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
ViewDetail Generates the html for a View Detail
ViewForm Generates the html for a View Form
ViewList Generates the html for a View List
ViewPlain Generates the html for a View Plain
ViewXmlReader Generates the html for a View XML Reader
ViewXmlWriter Generates the html for a View XML Writer

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Table

Table::$border
Table::$caption
Table::$cellpadding
Table::$cellspacing
Table::$class
Table::$summary
Table::$text
Table::$width

Inherited From Html

Html::$elements
Html::$sizeof

Inherited From Object

Object::$cachefile
Object::$html
Object::$sql

Inherited From Table

Table::Table()
Constructor
Table::display()
Display html
Table::end()
Get the end of the table tag
Table::getColumnEnd()
Get the Column End
Table::getColumnStart()
Get the Column Start
Table::getEnd()
Get the table end
Table::getHtml()
Get the complete html for a table
Table::getRowEnd()
Get the Row End
Table::getRowStart()
Get the Row Start
Table::getStart()
Get the start of the table
Table::getTableHeader()
Get the Table Header from class TableHeader
Table::start()
Get the start of the table tag
Table::td()
Display html for the TD tag
Table::tdend()
Get the end of the TD tag
Table::tdstart()
Get the start of the TD tag
Table::th()
Display html for a TH
Table::thend()
Get the end of the TH tag
Table::thstart()
Get the start of the TH tag
Table::tr()
Display html for the TR tag
Table::trend()
Get the end of the TR tag
Table::trstart()
Get the start of the TR tag

Inherited From Html

Html::Html()
Constructor
Html::add()
Add an element, the number of elements are stored internally in an array.
Html::content()
Read the content of the specified filename
Html::display()
Display the html
Html::get()
Get the complete html for a key
Html::getAttribute()
Get the complete html for an attribute, i.e. <a class="myclass" ...
Html::getElement()
Get the element at position $i in array
Html::getElements()
Get all the elements as html
Html::getHtml()
Get Html
Html::getHtmlHelp()
Get html help
Html::getSizeof()
Get the number of elements added
Html::getTag()
Get the complete html for a html tag, i.e. <p>My paragraph</p>
Html::read()
Read the content of the specified filename and language
Html::set()
Set the named attribute (key) of a class to specified value
Html::setObject()
Set the named object to the class attribute (key), with same name
Html::showsource()
Show source
Html::update()
Save the content of the specified filename and language

Inherited From Object

Object::Object()
Constructor
Object::addHtml()
Add the current html to the SourceCode object
Object::getCacheFileName()
Returns the name of the cache file name
Object::getClassName()
Returns the name of the instanciated class
Object::getHtml()
Returns the html for the element
Object::getMsg()
Get the formatted message and debug level and Log to file ?
Object::save()
Save the SQL cache file
Object::setCacheFileName()
Set the path/name of the cache file
Object::toString()
Returns the information for this class
Object::write()
Write the content to the file opened by fp

[ Top ]
Property Summary
DataReader   $datareader  
int   $id  
real   $subtotal  

[ Top ]
Method Summary
ViewCommon   ViewCommon()   Constructor
void   display()   Display html
Object   getColumn()   Return the column data as html <tr><td>header 1</td><td>data 1</td></tr> ...
Object   getData()   Return the header or data for a list view
String   getHtml()   Return the html
Object   getPrimaryKey()   The Primary key
Object   getRow()   Return the row data as html <tr><td>data 1</td><td>data 2</td><td>data ns</td></tr> ...

[ Top ]
Properties
DataReader   $datareader = null [line 54]

[ Top ]
int   $id = '' [line 59]

[ Top ]
real   $subtotal = 0 [line 64]

[ Top ]
Methods
Constructor ViewCommon  [line 78]

  ViewCommon ViewCommon( DataReader $datareader, [String $text = ''], [String $width = ''], [String $class = ''], [String $border = ''], [String $cellpadding = ''], [String $cellspacing = ''], [String $summary = ''], [String $caption = '']  )

Constructor

Parameters:
DataReader   $datareader:  The Data Reader object
String   $text:  The text header for the table
String   $width:  The Width for the table
String   $class:  The Class
String   $border:  The Border
String   $cellpadding:  The CellSpacing
String   $cellspacing:  The CellPadding
String   $summary:  The Summary
String   $caption:  The Caption


[ Top ]
display  [line 265]

  void display( DataReader $datareader, [String $text = ''], [String $width = ''], [String $class = ''], [String $border = ''], [String $cellpadding = ''], [String $cellspacing = ''], [String $summary = ''], [String $caption = '']  )

Display html

  1. Usage:
  2. ViewCommon::display($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);

Parameters:
DataReader   $datareader:  The Data Reader object
String   $text:  The text header for the table
String   $width:  The width of the table
String   $class:  The class of the table
String   $border:  The border of the table
String   $cellpadding:  The CellSpacing
String   $cellspacing:  The CellPadding
String   $summary:  The Summary
String   $caption:  The Caption

API Tags:
Static:  


Redefinition of:
Table::display()
Display html

Redefined in descendants as:

[ Top ]
getColumn  [line 221]

  Object getColumn( array $row, String $cssHeader, String $cssData  )

Return the column data as html <tr><td>header 1</td><td>data 1</td></tr> ...

Parameters:
array   $row:  The rows to loop
String   $cssHeader:  The CSS Header to use
String   $cssData:  The CSS Data to use

API Tags:
Return:  The html as an object


[ Top ]
getData  [line 91]

  Object getData( String $key, String $value, mixed $css, [boolean $isHeader = false], String $rowcolor  )

Return the header or data for a list view

Parameters:
String   $key:  The key to use
String   $value:  The value to use
String   $rowcolor:  The CSS class to use
boolean   $isHeader:  Is a header, if true

API Tags:
Return:  The html as an object


[ Top ]
getHtml  [line 242]

  String getHtml( )

Return the html


API Tags:
Return:  The html


Redefinition of:
Table::getHtml()
Get the complete html for a table

Redefined in descendants as:

[ Top ]
getPrimaryKey  [line 169]

  Object getPrimaryKey( String $key, String $value, mixed $css, boolean $isHeader, String $rowcolor  )

The Primary key

Parameters:
String   $key:  The key to use
String   $value:  The value to use
String   $rowcolor:  The CSS class to use
boolean   $isHeader:  Is a header, if true

API Tags:
Return:  The html as an object
Abstract:  


Redefined in descendants as:

[ Top ]
getRow  [line 182]

  Object getRow( array $row, mixed $css, [boolean $isHeader = false], String $rowcolor  )

Return the row data as html <tr><td>data 1</td><td>data 2</td><td>data ns</td></tr> ...

Parameters:
array   $row:  The row to loop for columns
String   $rowcolor:  The CSS class to use
boolean   $isHeader:  Is a header, if true

API Tags:
Return:  The html as an object


Redefined in descendants as:

[ Top ]

Documentation generated on Thu, 22 Dec 2005 17:21:31 +0100 by phpDocumentor 1.3.0RC3