getCellAttribute Patch to HTML_Table
| From: | ignatz at sieve dot net | Date: | Mon, 24 Jun 2002 20:38:11 +0000 |
| Subject: | getCellAttribute Patch to HTML_Table | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-7331@lists.php.net to get a copy of this message | ||
Heynow,
I noticed that there's no accessor method for a cell's attributes in HTML_Table's
$_structure array. Here's a proposed patch to do that:
/**
* Returns the value of a specified attribute for a given cell.
*
* @param int $row Row index
* @param int $col Column index
* @param string $attr Attribute name
* @access public
* @return string
*/
function getCellAttribute($row, $col, $attr)
{
if (isset($this->_structure[$row][$col]) && $this->_structure[$row][$col] ==
"__SPANNED__") return;
return $this->_structure[$row][$col]['attr'][$attr];
} // end func getCellAttribute
=>Chris
--
Christopher R. Baker
Tune Smith / Programmer
http://cbaker.org