$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:
$htmlTableWindrose = NULL
[line 127]
$_globalTdAttr = array()
[line 116]
$_globalTdStyle = array()
[line 124]
$_globalTrAttr = array()
[line 115]
$_globalTrStyle = array()
[line 123]
$_tableAttr = array()
[line 113]
Variables holding the attributes for the tags TABLE and TR (TD attr. are in the cell variable; see $this->cell)
$_tableStyle = array()
[line 121]
Variables holding the STYLE-attribute for TABLE and TR (TD style attr. are in the cell variable; see $this->cell)
$_trAttr = array()
[line 114]
$_trStyle = array()
[line 122]
Class Methods
constructor Bs_HtmlTable [line 133]
Bs_HtmlTable Bs_HtmlTable(
[mixed
$matrix = NULL])
|
|
*********************************************************************** Constructor
method clear [line 151]
*********************************************************************** Reset and clear the table The only thing that remains is the windrose.
Tags:
method flipData [line 1143]
*********************************************************************** Flips a table data only by setting rows to cols and cols to rows
Tags:
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:
Parameters:
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:
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:
Parameters:
method getNumCols [line 185]
returns the number of cols (including title cols etc, just everything).
Tags:
method getNumRows [line 175]
returns the number of rows (including title rows etc, just everything).
Tags:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
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:
Parameters:
method spanCol [line 594]
TRUE spanCol(
int
$colPos, [int
$offset = 0], [int
$amount = ''])
|
|
*********************************************************************** column spanning
Tags:
Parameters:
method spanRow [line 581]
TRUE spanRow(
int
$rowPos, [int
$offset = 0], [int
$amount = ''])
|
|
*********************************************************************** Row spanning
Tags:
Parameters:
method toHtml [line 1132]
*********************************************************************** Renders the HTML table
Tags:
Overrides Bs_Object::toHtml() (Dumps the content of this object to a string using PHP's var_dump().)
|