Docs For Class TABLEtag

## 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.

- author: Walter A. Boring IV <waboring@newsblob.com>

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
array $_default_col_attributes
array $_default_row_attributes
mixed $_tag
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:

- TBODYtag::$_tag : Tag definition for class.
- TFOOTtag::$_tag
- THEADtag::$_tag

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.

    function set_cell_attributes( $row, $col, $attributes=array() ) {

            if (is_object($this->_content[$row])) {
                if (is_object($this->_content[$row]->_content[$col])) {
                    $this->_content[$row]->_content[$col]->set_tag_attributes( $attributes);
                }
            }
        }

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

    function set_cell_content( $row, $col, $content) {

            $item = &$this->_get_element($row);
            if ( is_object($item) ) {
                $item = &$item->_get_element($col);
                if (is_object($item)) {
                    $item->reset_content( $content );
                } else {
                    return -1;
                }
            } else {
                return -1;
            }
        }

- 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.

    function set_default_col_attributes( $attributes ) {

            $this->_default_col_attributes = $attributes;
        }

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.

    function set_default_row_attributes( $attributes ) {

            $this->_default_row_attributes = $attributes;
        }

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.

    function set_row_attributes( $row, $attributes ) {
            if ($this->_content[$row]) {
                $this->_content[$row]->set_tag_attributes( $attributes );
            } else {
                return -1;
            }
        }

- 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

    function set_summary($summary) {
            $this->set_tag_attribute("summary", $summary);
        }

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 Thu, 1 Sep 2005 17:05:29 -0700 by phpDocumentor 1.3.0RC3