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
- Usage:
- $view = new ViewCommon($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
- print $view->getHtml();
- Or
- ViewCommon::display($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
-
- Generates a complete View Common interface
- +--------------------------------
- |>| Text header
- +--------------------------------
- | head1 | head2 | head3 | etc.
- +--------------------------------
- | dat_1 | dat_2 | dat_3 | etc.
- +--------------------------------
Located in /myphp-1.9/myphp-1.9-mvc/html/view/ViewCommon.php [line 50]
Object
|
--Html
|
--Table
|
--ViewCommon
|
Properties
|
Methods
|
Inherited Properties, Constants, and Methods
Method Summary
| 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 |
| Object |
getRow() |
Return the row data as html <tr><td>data 1</td><td>data 2</td><td>data ns</td></tr> ... |
Methods
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 |
void display(
DataReader
$datareader, [String
$text = ''], [String
$width = ''], [String
$class = ''], [String
$border = ''], [String
$cellpadding = ''], [String
$cellspacing = ''], [String
$summary = ''], [String
$caption = '']
)
|
|
Display html
- Usage:
- 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:
Redefinition of:
- Table::display()
- Display html
Redefined in descendants as:
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 |
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 |
Return the html
API Tags:
Redefinition of:
- Table::getHtml()
- Get the complete html for a table
Redefined in descendants as:
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:
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:
|
|