// $Id$
//
-
// +X2C includes
require_once 'BIFE/Container.php';
// ~X2C
* Attribute list.
*
* @var array $attrs
- * @access public
+ * @access protected
*/
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
// +X2C Operation 11
/**
- * Add contents to the widget.
+ * Add contents to the container.
*
- * @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);
+ }
+ if ($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
{
+ $contents = parent::render($template);
$template->loadTemplateFile(get_class($this).'.html');
$template->setVariable($this->attrs);
- $template->setVariable('CONTENTS', $this->contents);
+ $template->setVariable('CONTENTS', $contents);
return $template->get();
}
// -X2C