Class TABLEtag

Description

<TABLE> tag class

The <table> tag defines the start of a table. Inside a table row you can put table headers, table rows, and table cells.

Located in /tag_classes/ALLTAGS.inc (line 1259)

Container
   |
   --XMLTagClass
      |
      --HTMLTagClass
         |
         --TABLEtag
Direct descendents
Class Description
TBODYtag <TBODY> class.
TFOOTtag <TFOOT> tag class
THEADtag Table Header <THEAD> class.
Variable Summary
Method Summary
string add_row (mixed $args)
void push_row ()
none set_cell_attributes (int $row, int $col, [array $attributes = array()])
mixed set_cell_content (int $row, int $col, mixed $content)
none set_default_col_attributes (array $attributes)
none set_default_row_attributes (array $attributes)
mixed set_row_attributes (int $row, array $attributes, int $col)
none set_summary (string $summary)
Variables
array $_default_col_attributes = array() (line 1275)

Holds the default attributes for all <td>'s

  • private:
array $_default_row_attributes = array() (line 1268)

Holds the default attributes for all <tr>'s

  • private:
mixed $_tag = "table" (line 1260)

Redefined in descendants as:
Methods
add_row (line 1299)

push 1 row (tr) of content.

Content can be raw strings, or tag objects. Can push 1 item, or multiple items in call. Each item will be its own td. should call push() to push a <TR> object, but we detect it here anyway. This function does not save the content by reference. It copies the content and pushes it into the table. If you want to save a reference use push() instead.

  • public:
string add_row (mixed $args)
  • mixed $args: The <td>'s to push for next row
push_row (line 1346)

Same ass add_row()

NOTE: only exists for compatibility with 1.x

  • deprecated: - use add()
void push_row ()
set_cell_attributes (line 1392)

update the attributes of a particular element or td.

  1. function set_cell_attributes$row$col$attributes=array() ) {
  2.  
  3.         if (is_object($this->_content[$row])) {
  4.             if (is_object($this->_content[$row]->_content[$col])) {
  5.                 $this->_content[$row]->_content[$col]->set_tag_attributes$attributes);
  6.             }
  7.         }
  8.     }

none set_cell_attributes (int $row, int $col, [array $attributes = array()])
  • int $row: row # of the table to edit
  • int $col: column # of the table to edit
  • array $attributes: array of name=>value pairs
set_cell_content (line 1428)

This method sets/resets the content for a specific cell in the table

  1. function set_cell_content$row$col$content{
  2.  
  3.         $item &$this->_get_element($row);
  4.         if is_object($item) ) {
  5.             $item &$item->_get_element($col);
  6.             if (is_object($item)) {
  7.                 $item->reset_content$content );
  8.             else {
  9.                 return -1;
  10.             }
  11.         else {
  12.             return -1;
  13.         }
  14.     }

  • return: -1 if the cell doesn't exist already
mixed set_cell_content (int $row, int $col, mixed $content)
  • int $row: the row number
  • int $col: the column number
  • mixed $content: the cell content
set_default_col_attributes (line 1376)

Sets the default attributes for <td>'s that are added to the table. If there are any attributes set for the <td> it won't use the defaults.

  1. function set_default_col_attributes$attributes {
  2.  
  3.         $this->_default_col_attributes $attributes;
  4.     }

none set_default_col_attributes (array $attributes)
  • array $attributes: - the default attributes
set_default_row_attributes (line 1361)

Sets the default attributes for <tr>'s that are added to the table. If there are any attributes set for the <tr> it won't use the defaults.

  1. function set_default_row_attributes$attributes {
  2.  
  3.         $this->_default_row_attributes $attributes;
  4.     }

none set_default_row_attributes (array $attributes)
  • array $attributes: - the default attributes
set_row_attributes (line 1410)

update the attributes of a particular row or tr.

  1. function set_row_attributes$row$attributes {
  2.         if ($this->_content[$row]{
  3.             $this->_content[$row]->set_tag_attributes$attributes );
  4.         else {
  5.             return -1;
  6.         }
  7.     }

  • return: -1 if the row doesn't exist already
mixed set_row_attributes (int $row, array $attributes, int $col)
  • int $row: row # of the table to edit
  • int $col: column # of the table to edit
  • array $attributes: array of name=>value pairs
set_summary (line 1452)

This method is used to set a summary attribute on the table for speech-synthesizing non-visual browsers

  1. function set_summary($summary{
  2.         $this->set_tag_attribute("summary"$summary);
  3.     }

none set_summary (string $summary)
  • string $summary: the summary

Inherited Methods

Inherited From HTMLTagClass

HTMLTagClass::HTMLTagClass()
HTMLTagClass::render()
HTMLTagClass::set_class()
HTMLTagClass::set_id()
HTMLTagClass::set_style()

Inherited From XMLTagClass

XMLTagClass::XMLTagClass()
XMLTagClass::get_tag()
XMLTagClass::get_tag_attribute()
XMLTagClass::get_tag_name()
XMLTagClass::render()
XMLTagClass::reset_attributes()
XMLTagClass::set_cdata_flag()
XMLTagClass::set_collapse()
XMLTagClass::set_newline_after_closetag()
XMLTagClass::set_newline_after_opentag()
XMLTagClass::set_tag_attribute()
XMLTagClass::set_tag_attributes()
XMLTagClass::set_tag_name()
XMLTagClass::_set_flags()

Inherited From Container

Container::Container()
Container::add()
Container::add_reference()
Container::count_content()
Container::get_element()
Container::get_indent_flag()
Container::push()
Container::push_reference()
Container::render()
Container::reset_content()
Container::set_collapse()
Container::set_indent_flag()

Documentation generated on Fri, 28 Jan 2011 08:52:47 -0500 by phpDocumentor 1.4.3