''
,'bln_endtag' => '1'
,'attributes' => ''
,'contents' => ''
);
function cls_htmlbase($in_props) {
while (list($key, $value) = each($this->defaults)) {
$this->props[$key] = $value;
}
while (list($key, $value) = each($in_props)) {
$this->props[$key] = $value;
}
}
// Here is the uniquely named function.
// Only the name has changed, it's code
// remains the same.
function htmlbase_generate() {
$tag_name = $this->props['tag_name'];
$buffer = "<$tag_name>";
// add children to buffer.
if ($this->props['bln_endtag'] == '1') {
$buffer .= "$tag_name>";
}
return($buffer);
}
// This is the function that gets overridden
// by child classes. Its only job is to call
// the uniquely-named function.
function generate() {
return($this->htmlbase_generate());
}
}
?>