parent = $table; } // ################################################################### /** * Sets the CSS class to use. Use ":swap:" to alternate * * @param string CSS class */ public function setCssClass($class) { $this->cssClass = $class; } // ################################################################### /** * Sets the parent element */ public function setParent(BSPrinterElement $parent) { trigger_error('Cannot set the parent element on a BSPrinterRootElement'); } // ################################################################### /** * Gets the parent element (none exist as this is the root element) */ public function getParent() { return null; } // ################################################################### /** * Returns the number of columns in this element * * @return integer Column count */ public function numberOfColumns() { return sizeof($this->children); } // ################################################################### /** * Returns the HTML for all printed children elements * * @return string Printed HTML */ protected function _paintChildren() { $builder = ''; foreach ($this->children AS $child) { $builder .= "\n" . $child->paint() . "\n"; } return $builder; } // ################################################################### /** * Paints the entire table row * * @return string Table row HTML */ public function paint() { return "" . $this->_paintChildren() . ""; } } /*=====================================================================* || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>