| // +--------------------------------------------------------------------+ // // $Id$ // // +X2C includes require_once 'BIFE/Container.php'; // ~X2C // +X2C Class 7 :Generic /** * This is a generic and simple BIFE_Container implementation. * * @access public * @abstract */ class BIFE_Generic extends BIFE_Container { /** * Attribute list. * * @var array $attrs * @access public */ var $attrs; /** * @var string $contents * @access public */ var $contents; // ~X2C // +X2C Operation 10 /** * Constructor. * * @param array $attrs Attributes. * * @return void * @access public */ function BIFE_Generic($attrs) // ~X2C { $this->attrs = $attrs; $this->contents = ''; } // -X2C // +X2C Operation 11 /** * Add contents to the widget. * * @param string $contents Contents to add. * * @return void * @access public */ function addContents($contents) // ~X2C { $this->contents .= trim($contents); } // -X2C // +X2C Operation 12 /** * Renders the widget. * * @param HTML_Template_Sigma &$template Template to use to render the widget. * * @return void * @access public */ function render(&$template) // ~X2C { $template->loadTemplateFile(get_class($this).'.html'); $template->setVariable($this->attrs); $template->setVariable('CONTENTS', $this->contents); return $template->get(); } // -X2C } // -X2C Class :Generic ?>