*/
var $attrs;
- /**
- * @var string $contents
- * @access public
- */
- var $contents;
-
// ~X2C
// +X2C Operation 10
*/
function BIFE_Generic($attrs) // ~X2C
{
- $this->attrs = $attrs;
- $this->contents = '';
+ $this->__construct($attrs);
+ }
+ // -X2C
+
+ // +X2C Operation 51
+ /**
+ * Constructor.
+ *
+ * @param array $attrs Attributes.
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($attrs) // ~X2C
+ {
+ parent::__construct();
+ $this->attrs = $attrs;
}
// -X2C
/**
* Add contents to the widget.
*
- * @param string $contents Contents to add.
+ * @param mixed &$contents Contents to add.
*
* @return void
* @access public
*/
- function addContents($contents) // ~X2C
+ function addContents(&$contents) // ~X2C
{
- $this->contents .= trim($contents);
+ if (is_string($contents)) {
+ $contents = trim($contents);
+ }
+ parent::addContents($contents);
}
// -X2C
*
* @param HTML_Template_Sigma &$template Template to use to render the widget.
*
- * @return void
+ * @return string
* @access public
*/
function render(&$template) // ~X2C
{
$template->loadTemplateFile(get_class($this).'.html');
$template->setVariable($this->attrs);
- $template->setVariable('CONTENTS', $this->contents);
+ $template->setVariable('CONTENTS', parent::render($template));
return $template->get();
}
// -X2C
} // -X2C Class :Generic
-?>
\ No newline at end of file
+?>