| // +--------------------------------------------------------------------+ // // $Id$ // // +X2C includes require_once 'BIFE/Fallback.php'; // ~X2C // +X2C Class 76 :Copy /** * Fallback widget that copies the XML. * * @access public */ class BIFE_Copy extends BIFE_Fallback { // ~X2C // +X2C Operation 79 /** * Constructor. * * @param string $name Widget name. * @param array $attrs Attributes. * * @return void * @access public */ function BIFE_Copy($name, $attrs) // ~X2C { $this->__construct($name, $attrs); } // -X2C // +X2C Operation 80 /** * Constructor. * * @param string $name Widget name. * @param array $attrs Attributes. * * @return void * @access public */ function __construct($name, $attrs) // ~X2C { parent::__construct($name, $attrs); } // -X2C // +X2C Operation 82 /** * Renders the widget returning a string with the results. * * @param HTML_Template_Sigma &$template Template to use to render the widget. * * @return void * @access public */ function render(&$template) // ~X2C { $name = $this->name; $ret = "<$name"; foreach ($this->attrs as $attr => $val) { $ret .= sprintf(' %s="%s"', $attr, $val); } $contents = parent::render($template); if ($contents) { $ret .= ">$contents"; } else { $ret .= "/>"; } return $ret; } // -X2C } // -X2C Class :Copy ?>