blueshoes php application framework and cms            core_html
[ class tree: core_html ] [ index: core_html ] [ all elements ]

Class: Bs_HtmlTable

Source Location: /core/html/table/Bs_HtmlTable.class.php

Class Overview

Bs_Object
   |
   --Bs_HtmlTable

HtmlTable class Can manipulate content, attributes and style and then render the data to a nicely formed HTML table.


Author(s):

Version:

  • 4.3.$Revision: 1.4 $ $Date: 2003/10/29 17:48:41 $

Copyright:

  • blueshoes.org

Variables

Methods


Inherited Variables

Inherited Methods

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 77]
HtmlTable class Can manipulate content, attributes and style and then render the data to a nicely formed HTML table.

 Following functions are covered
  o) Data manipulation
     Init
       - Init with a 2D array
     Set
       - Push in a row or column of data (as value or 1D array)
       - Set (overwrite) a row, column or area of data.
     Get data streams (all by *reference* !) of
       - a row, column or area of data.
  o) Hiding
     Hide rows, columns or areas
  o) Spanning
     Span rows, columns or areas
  o) Attribute and STYLE setting:
     It's possible to set or merge styles(see *1) and attributes(see *2) to
       - the specific HTML-table tag : TABLE and TR
       - a random table cell (by setting the TD-tag OR using the  ...  tag)
       - all, row, column or area of cells (by setting the TD-tag OR using the  ...  tag)
     Support to set relative areas like
       - Center, top row, zebra, ...
       See Bs_HtmlTableWindrose.class.php
  o) Table cascading
     The content of a cell can be an other Bs_HtmlTable-object itself. It is then rendered as
     cascading table.
 

NOTE *1) and *2) I'm distinguishing between HTML-attributes and STYLE although STYLE is actually also a HTML-attribute that holds another set of attributes (which gave me a name space headache ;-) ) So fuctions end often with 'Attr' or 'Style' like setTableAttr() or setTableStyle() One setting the STYLE attributes, the other the HTML-tag attributes.

 NOTE: The order of paramters is ROW, then COLUMN. Positions start with 0, 0.
       This is important to know when you want to define an area in the
       table. Area is defined by a point (row/col) and amount(!) (x-rows/y-cols)
       It's like a normal x/y-coordonat system turned by +90°
       E.g. the area in the folling example would be defined as getArea(1,3,3,4)
      (0/0)|
        ---+--3---7-> col
           1  x             <--- at (1/3) (row/col)
           |
           4      x         <--- at (4/7) (row/col)
           |
          row
 

 example: (to get you started)
   $data = array(array('apfel', 'banane', 'pfirsich'),
                 array('stuhl', 'tisch', 'bank'));
   $tbl =& new Bs_HtmlTable($data);
   echo &$tbl->renderTable();
   //huh, that was easy, right? only because it offers *a lot* doesn't meen it is
   //complicated.
 




Tags:

version:  4.3.$Revision: 1.4 $ $Date: 2003/10/29 17:48:41 $
copyright:  blueshoes.org
author:  Sam Blum <at blueshoes dot org>


[ Top ]


Class Variables

$cell = array()

[line 92]

Cell: You may modify this var directly. It stands for the HTML table cell and has

the format

  $cell[$row][$col]['data']  : The cell content (usualy a string OR a Bs_HtmlTable.class object)
  $cell[$row][$col]['attr']  : A hash array holding the 'cell' attr. used in the 
tag. See setTdAttr() " " " ['style'] : A hash array holding the 'cell' style used in the tag. See setTdStyle() ['hidden']: If TRUE don't show the content when rendering the table. ['span_start']: If TRUE this cell is the top left cell of a spaned area ['spaned'] : If TRUE this cell belongs to a spaned area. Not shown when rendering the table.




Tags:

access:  public

Type:   array


[ Top ]

$htmlTableWindrose =  NULL

[line 127]


Type:   mixed


[ Top ]

$_globalTdAttr = array()

[line 116]


Type:   mixed


[ Top ]

$_globalTdStyle = array()

[line 124]


Type:   mixed


[ Top ]

$_globalTrAttr = array()

[line 115]


Type:   mixed


[ Top ]

$_globalTrStyle = array()

[line 123]


Type:   mixed


[ Top ]

$_tableAttr = array()

[line 113]

Variables holding the attributes for the tags TABLE and TR (TD attr. are in the cell variable; see $this->cell)


Type:   mixed


[ Top ]

$_tableStyle = array()

[line 121]

Variables holding the STYLE-attribute for TABLE and TR (TD style attr. are in the cell variable; see $this->cell)


Type:   mixed


[ Top ]

$_trAttr = array()

[line 114]


Type:   mixed


[ Top ]

$_trStyle = array()

[line 122]


Type:   mixed


[ Top ]



Class Methods


constructor Bs_HtmlTable [line 133]

Bs_HtmlTable Bs_HtmlTable( [mixed $matrix = NULL])

***********************************************************************

Constructor




[ Top ]

method clear [line 151]

void clear( )

*********************************************************************** Reset and clear the table The only thing that remains is the windrose.



Tags:

access:  public


[ Top ]

method flipData [line 1143]

void flipData( )

***********************************************************************

Flips a table data only by setting rows to cols and cols to rows




Tags:

access:  public


[ Top ]

method getArea [line 472]

2-D &getArea( [int $rowPos = 0], [int $colPos = 0], [int $x = ''], [int $y = ''], [string $what = NULL])

*********************************************************************** Gets a 2-D array clip by *reference* of all the cells defined by the area.

With the $what param it is possible to pick a cell part e.g. 'data' or 'attr' instead of the whole cell.




Tags:

return:  array clip by *reference* of 'wath'. Or empty array if off limit.
access:  public
see:  $this->cell for structur of cell


Parameters:

int   $rowPos   (opt) Start of get row (Default 0)
int   $colPos   (opt) Start of get col (Default 0)
int   $x   (opt) amount of row (Default ALL)
int   $y   (opt) amount of col (Default ALL)
string   $what   (opt) (Default a whole cell)

[ Top ]

method getAreaStream [line 501]

1-D &getAreaStream( [mixed $rowPos = 0], [mixed $colPos = 0], [mixed $x = ''], [mixed $y = ''], [mixed $what = NULL])

*********************************************************************** Same as $this->getArea() But gets a 1-D array stream by *reference* of all the cells defined by the area. Handy to loop through the table data to change it.



Tags:

return:  array stream by *reference* of 'wath'. Or empty array if off limit.
see:  $this->getArea()
access:  public


[ Top ]

method getCol [line 454]

1-D &getCol( int $colPos, [string $what = NULL])

*********************************************************************** Gets a 1-D array stream by *reference* of a column defined by the $colPos.

With the $what param it is possible to pick a cell part e.g. 'data'




Tags:

return:  array stream by *reference* of 'wath'. Or empty array if off limit.
access:  public
see:  $this->cell for structur of cell


Parameters:

int   $colPos   the abs. col number starting with 0
string   $what   (opt) (Default a whole cell)

[ Top ]

method getNumCols [line 185]

int getNumCols( )

returns the number of cols (including title cols etc, just everything).



Tags:

see:  Bs_HtmlTable::getNumRows(), var $_colSize
access:  public


[ Top ]

method getNumRows [line 175]

int getNumRows( )

returns the number of rows (including title rows etc, just everything).



Tags:

see:  Bs_HtmlTable::getNumCols(), var $_rowSize
access:  public


[ Top ]

method getRow [line 440]

1-D &getRow( int $rowPos, [string $what = NULL])

*********************************************************************** Gets a 1-D array stream by *reference* of a row defined by the $rowPos.

With the $what param it is possible to pick a cell part e.g. 'data'




Tags:

return:  array stream by *reference* of 'wath'. Or empty array if off limit.
access:  public
see:  $this->cell for structur of cell


Parameters:

int   $rowPos   the abs. row number starting with 0
string   $what   (opt) (Default a whole cell)

[ Top ]

method hideArea [line 560]

void hideArea( int $rowPos, int $colPos, [int $x = ''], [int $y = ''])

***********************************************************************

Hides (skips) the content of an area when rendering the table




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
int   $colPos   the abs. col number starting with 0
int   $x   (opt) $x amount of rows
int   $y   (opt) $y amount of cols

[ Top ]

method hideCol [line 546]

void hideCol( int $colPos, [int $offset = 0], [inteter $amount = ''])

***********************************************************************

Hides (skips) the content of a column when rendering the table




Tags:

access:  public


Parameters:

int   $colPos   the abs. col number starting with 0
int   $offset   (opt) number to skip (Default 0)
inteter   $amount   of cells (Default to table end)

[ Top ]

method hideRow [line 533]

void hideRow( int $rowPos, [int $offset = 0], [int $amount = ''])

***********************************************************************

Hides (skips) the content of a row when rendering the table




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
int   $offset   (opt) number to skip (Default 0)
int   $amount   of cells (Default to table end)

[ Top ]

method initByMatrix [line 207]

TRUE initByMatrix( mixed $value)

*********************************************************************** Init the content of the HtmlTable object.

Only content is overwritten; attr.-, style-, hidding-, spanning-info etc. are preserved. If $value is not an array a 1 x 1 table is created. If $value is an 1-D array a 1 x m table is created. Table with 1-row/m-cols. If $value is an 2-D array a n x m table is created. Table with n-row/m-cols. n = size of array / m = size of inner array Hash arrays and normal arrays are accepted. Also a 2-D array may have longer shorter row-length. The table will take the longest row as its row size. NOTE: You may pass data by reference. Any change on that data will effect the table content as well. NOTE: The content of a cell can be an other Bs_HtmlTable-object itself. It is then also rendered as cascading table.




Tags:

access:  public


Parameters:

mixed   $value   a value, 1-D or 2-D array of data (HTML table content).

[ Top ]

method pushCol [line 326]

integer pushCol( array $value, [int $colPos = -1])

*********************************************************************** Inserts a COL (any array of data) at postion $colPos by pushing the other cols to right.

If no position is given or if the position is larger then the max cols, the array will append to the last col position.

NOTE: If passed array is to short (meaning: there more cols then array elements) the array will be blown up with NULL values. It it's to long, it will be cut.




Tags:

return:  The position the col was inserted.
access:  public


Parameters:

array   $value   a value or 1-D array of HTML table content.
int   $colPos   (opt) row position to push in the data. Default: at the end.

[ Top ]

method pushRow [line 272]

integer pushRow( array $value, [int $rowPos = -1])

*********************************************************************** Inserts a ROW (any array of data) at postion $rowPos by pushing the other rows down.

If no position is given or if the position is larger then the max rows, the array will append to the last row position.

NOTE: If passed array is to short (meaning: there are more cols then array elements) the array will be blown up with NULL values. If it's to long, it will be cut.




Tags:

return:  The position the row was inserted.
access:  public


Parameters:

array   $value   a value or 1-D array of HTML table content.
int   $rowPos   (opt) row position to push in the data. Default: at the end.

[ Top ]

method renderTable [line 1037]

string &renderTable( [bool $useClassID = FALSE], [int $indent = 2], [string $tableTag = NULL])

*********************************************************************** Renders the HTML table Here we put all the data together.

1) Global attrs and global styles are set first. 2*)If windrose is set: windrose-attrs and -styles are set. 3) Finally the set attrs and styles are merged on top. *)Special case in step 2) if $useClassID is TRUE. Instead of setting the style we add the CLASS-tag and style ID. This makes sense when you plan to use CSS. See Bs_HtmlTableWindrose->getCssBlock().




Tags:

return:  The HTML output.
access:  public


Parameters:

bool   $useClassID   see above
int   $indent   amount of spaces to indent at the beginning
string   $tableTag   (if you want to set one here, eg <table border="0">. it will be used 1:1 and all settings will be ignored.)

[ Top ]

method setArea [line 397]

void setArea( int $rowPos, int $colPos, mixed $value, [int $x = ''], [int $y = ''])

*********************************************************************** Fill a table area with a value, a 1-D array[row] or 2-D array[row][col].

Begining at the position given be the coordinats params. Staring at (0/0). Any data passing the table limits is truncated.




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
int   $colPos   the abs. col number starting with 0
mixed   $value   value, a 1-D array[row] or 2-D array[row][col] of HTML table content.
int   $x   (opt) amount of rows to set (Default to table end)
int   $y   (opt) amount of cols to set (Default to table end)

[ Top ]

method setAreaAttr [line 806]

void setAreaAttr( int $rowPos, int $colPos, array $newAttr, [int $x = ''], [int $y = ''])

*********************************************************************** Sets any TD attributes to an area of cells by setting each TD tag.

Pass a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...). NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name="value" name="value"'




Tags:

see:  Bs_HtmlTable::getArea()
access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
int   $colPos   the abs. col number starting with 0
array   $newAttr   hash array of attribute(s) e.g. array('width'=>'50px', ...)
int   $x   (opt) amount of row to set (Default to table end)
int   $y   (opt) amount of col to set (Default to table end)

[ Top ]

method setAreaStyle [line 981]

void setAreaStyle( int $rowPos, int $colPos, mixed $newStyle, [int $x = ''], [int $y = ''])

*********************************************************************** Sets any STYLE attributes to an area of cells by setting each TD tag.

Pass a style-string OR a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...). NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name:value; name:value;'




Tags:

see:  Bs_HtmlTable::getArea()
access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
int   $colPos   the abs. col number starting with 0
mixed   $newStyle   string OR hash array of attribute(s) e.g. 'font:arial;...' OR array('font'=>'arial', ...)
int   $x   (opt) amount of row to set (Default to table end)
int   $y   (opt) amount of col to set (Default to table end)

[ Top ]

method setCol [line 371]

void setCol( int $colPos, mixed $value, [int $offset = 0], [inteter $amount = ''])

*********************************************************************** Fill a table col with content given by a value or a 1-D array.

Any data passing the table limits is truncated.




Tags:

access:  public


Parameters:

int   $colPos   the abs. col number starting with 0
mixed   $value   or 1-D array of content
int   $offset   (opt) where to start inserting (Default 0)
inteter   $amount   (opt) of cells to set (Default to table end OR in case of array: array-length)

[ Top ]

method setColAttr [line 786]

TRUE setColAttr( int $colPos, mixed $newAttr, [int $offset = 0], [inteter $amount = ''])

*********************************************************************** Sets any STYLE attributes to one column by setting each TD tag.

NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name="value" name="value"'




Tags:

access:  public


Parameters:

int   $colPos   the abs. col number starting with 0
mixed   $newAttr   string OR hash array of attribute(s) e.g. 'width="50px ...' OR array('width'=>'50px', ...)
int   $offset   (opt) number to skip (Default 0)
inteter   $amount   of cells (Default to table end)

[ Top ]

method setColStyle [line 962]

TRUE setColStyle( int $colPos, mixed $newStyle, [int $offset = 0], [inteter $amount = ''])

*********************************************************************** Sets any STYLE attributes to one col by setting each TD tag.

NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name:value; name:value;'




Tags:

access:  public


Parameters:

int   $colPos   the abs. col number starting with 0
mixed   $newStyle   string OR hash array of attribute(s) e.g. 'font:arial;...' OR array('font'=>'arial', ...)
int   $offset   (opt) number to skip (Default 0)
inteter   $amount   of cells (Default to table end)

[ Top ]

method setGlobalTdAttr [line 746]

void setGlobalTdAttr( mixed $newAttr)

*********************************************************************** Sets all TD attributes before any other attr. are set. Following TD attributes are then merged on top.

Pass a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed. The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...).

NOTE: Using hash array is faster. If you use a string, then use the right syntax! 'name="value" name="value"'




Tags:

see:  Bs_HtmlTable::setRowAttr()
access:  public


Parameters:

mixed   $newAttr   string OR hash array of attribute(s) e.g. 'width="50px ...' OR array('width'=>'50px', ...)

[ Top ]

method setGlobalTdStyle [line 924]

void setGlobalTdStyle( mixed $newStyle)

*********************************************************************** Sets the STYLE-attr to all TD attributes befor any other attr. are set. Following TD styles are then merged on top.

Pass a style-string OR a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...). NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name:value; name:value;'




Tags:

access:  public


Parameters:

mixed   $newStyle   string OR hash array of attribute(s) e.g. 'font:arial;...' OR array('font'=>'arial', ...)

[ Top ]

method setGlobalTrAttr [line 717]

void setGlobalTrAttr( mixed $newAttr)

*********************************************************************** Sets all TR attributes befor any other attr. are set. Following TR attributes are then merged on top.

Pass a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...). NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name="value" name="value"'




Tags:

access:  public


Parameters:

mixed   $newAttr   string OR hash array of attribute(s) e.g. 'width="50px ...' OR array('width'=>'50px', ...)

[ Top ]

method setGlobalTrStyle [line 901]

void setGlobalTrStyle( mixed $newStyle)

*********************************************************************** Sets the STYLE-attr to all TR attributes befor any other attr. are set. Following TR styles are then merged on top.

Pass a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...). NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name:value; name:value;'




Tags:

access:  public


Parameters:

mixed   $newStyle   string OR hash array of attribute(s) e.g. 'font:arial;...' OR array('font'=>'arial', ...)

[ Top ]

method setRow [line 347]

void setRow( int $rowPos, mixed $value, [int $offset = 0], [inteter $amount = ''])

*********************************************************************** Fill a table row with content given by a value or any 1-D array.

Any data passing the table limits is truncated.




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
mixed   $value   or 1-D array of content
int   $offset   (opt) where to start inserting (Default 0)
inteter   $amount   (opt) of cells to set (Default to table end OR in case of array: array-length)

[ Top ]

method setRowAttr [line 770]

bool setRowAttr( int $rowPos, mixed $newAttr, [int $offset = 0], [int $amount = ''])

*********************************************************************** Sets any attributes to one row by setting each TD tag.

NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name="value" name="value"'




Tags:

return:  TRUE
see:  Bs_HtmlTable::setGlobalTdAttr()
access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
mixed   $newAttr   string OR hash array of attribute(s) e.g. 'width="50px ...' OR array('width'=>'50px', ...)
int   $offset   (opt) number to skip (Default 0)
int   $amount   of cells (Default to table end)

[ Top ]

method setRowStyle [line 947]

TRUE setRowStyle( int $rowPos, mixed $newStyle, [int $offset = 0], [int $amount = ''])

*********************************************************************** Sets any STYLE attributes to one row by setting each TD tag.

NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name:value; name:value;'




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
mixed   $newStyle   string OR hash array of attribute(s) e.g. 'font:arial;...' OR array('font'=>'arial', ...)
int   $offset   (opt) number to skip (Default 0)
int   $amount   of cells (Default to table end)

[ Top ]

method setTableAttr [line 650]

void setTableAttr( mixed $newAttr)

*********************************************************************** Sets any TABLE attributes using name/value pair or hash array.

Pass a hash array containing the name and value pair(s) you wish to set. If value = NULL only a name will be placed. The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...). NOTE: Using hash array is faster. If you use a string, then use the right syntax! 'name="value" name="value"'




Tags:

access:  public


Parameters:

mixed   $newAttr   string OR hash array of attribute(s) e.g. 'width="50px ...' OR array('width'=>'50px', ...)

[ Top ]

method setTableStyle [line 835]

void setTableStyle( mixed $newStyle)

*********************************************************************** Sets the STYLE-attr in the TABLE-tag using name/value pair or hash array.

Pass a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...). NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name:value; name:value;'




Tags:

access:  public


Parameters:

mixed   $newStyle   string OR hash array of attribute(s) e.g. 'font:arial;...' OR array('font'=>'arial', ...)

[ Top ]

method setTdAttr [line 701]

void setTdAttr( int $rowPos, int $colPos, mixed $newAttr)

*********************************************************************** Sets any TD attribute (The HTML Table Data tag) Pass a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...).

NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name="value" name="value"'




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
int   $colPos   the abs. col number starting with 0
mixed   $newAttr   string OR hash array of attribute(s) e.g. 'width="50px ...' OR array('width'=>'50px', ...)

[ Top ]

method setTdStyle [line 885]

void setTdStyle( int $rowPos, int $colPos, mixed $newStyle)

*********************************************************************** Sets the STYLE-attr in any TD-tag Pass a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...).

NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name:value; name:value;'




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
int   $colPos   the abs. col number starting with 0
mixed   $newStyle   string OR hash array of attribute(s) e.g. 'font:arial;...' OR array('font'=>'arial', ...)

[ Top ]

method setTrAttr [line 675]

void setTrAttr( int $rowPos, mixed $newAttr)

*********************************************************************** Sets any TR-tag attribute. (The HTML Table Row tag) Pass a hash array containing the name(s) and value(s) pair(s) you wish to set.

If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...). NOTE: Using hash array is more performant. If you use a string, then use the right syntax! 'name="value" name="value"'




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
mixed   $newAttr   string OR hash array of attribute(s) e.g. 'width="50px ...' OR array('width'=>'50px', ...)

[ Top ]

method setTrStyle [line 859]

void setTrStyle( int $rowPos, mixed $newStyle)

*********************************************************************** Sets the STYLE-attr in any TR-tag Pass a hash array containing the name(s) and value(s) pair(s) you wish to set. If value = NULL only name will be placed The hash array must have the form: array(name=>value, name=>value, name=>NULL, ...).

NOTE: Using hash array is more perfomant. If you use a string, then use the right syntax! 'name:value; name:value;'




Tags:

access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
mixed   $newStyle   string OR hash array of attribute(s) e.g. 'font:arial;...' OR array('font'=>'arial', ...)

[ Top ]

method setWindroseStyle [line 1008]

void setWindroseStyle( object A $htmlWindroseObj)

*********************************************************************** Set a windrose object The windrose object has knowledge where to set a style at a RELATIVE position of a HTML table such as North, Center, Zebra, ...

It is recommended to pass the windrose object by reference. All changes to windrose will then be reflected during the Html table rendering




Tags:

access:  public
see:  Bs_HtmlTableWindrose.class.php


Parameters:

object A   $htmlWindroseObj   Bs_HtmlTableWindrose object. RECOMMENDATION: pass by reference.

[ Top ]

method spanArea [line 608]

TRUE spanArea( int $rowPos, int $colPos, [int $x = ''], [int $y = ''])

*********************************************************************** Area spanning. Returns FALSE if a span overlapping is detected.



Tags:

return:  on success else FALSE
access:  public


Parameters:

int   $rowPos   the abs. row number starting at 0
int   $colPos   the abs. col number starting at 0
int   $x   (opt) amount of row span (Default to table end)
int   $y   (opt) amount of col span (Default to table end)

[ Top ]

method spanCol [line 594]

TRUE spanCol( int $colPos, [int $offset = 0], [int $amount = ''])

***********************************************************************

column spanning




Tags:

return:  on success else FALSE
access:  public


Parameters:

int   $colPos   the abs. col number starting with 0
int   $offset   (opt) number to skip (Default 0)
int   $amount   (opt) to span (Default to table end)

[ Top ]

method spanRow [line 581]

TRUE spanRow( int $rowPos, [int $offset = 0], [int $amount = ''])

***********************************************************************

Row spanning




Tags:

return:  on success else FALSE
access:  public


Parameters:

int   $rowPos   the abs. row number starting with 0
int   $offset   (opt) number to skip (Default 0)
int   $amount   (opt) to span (Default to table end)

[ Top ]

method toHtml [line 1132]

void &toHtml( )

***********************************************************************

Renders the HTML table




Tags:

see:  $this->renderTable()


Overrides Bs_Object::toHtml() (Dumps the content of this object to a string using PHP's var_dump().)

[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:10:56 +0100 by phpDocumentor 1.2.3