| // +--------------------------------------------------------------------+ // // $Id$ // // +X2C includes require_once 'BIFE/Widget.php'; // ~X2C // +X2C Class 5 :Container /** * Base container widget class. * * @package BIFE * @access public * @abstract */ class BIFE_Container extends BIFE_Widget { /** * Widget contents. * * @var array $contents * @access public */ var $contents = array(); // ~X2C // +X2C Operation 6 /** * Adds contents to the container. * * @param mixed &$contents Contents to add to the container. * * @return void * @access public */ function addContents(&$contents) // ~X2C { if (is_object($contents)) { $this->contents[] =& $contents; } else { $this->contents[] = $contents; } } // -X2C // +X2C Operation 59 /** * Renders the widget using a template returning a string with the results. * * @param HTML_Template_HIT &$template Template object to render the widget. * * @return string * @access public */ function renderContents(&$template) // ~X2C { $c = count($this->contents); $o = ''; for ($i = 0; $i < $c; $i++) { if (is_object($this->contents[$i])) { $o .= $this->contents[$i]->render($template); } else { $o .= $this->contents[$i]; } } return $o; } // -X2C } // -X2C Class :Container ?>