AAAAhome/academiac/www/plugins/vmpayment/sofort/sofort/library/helper/elements/sofort_tag.php000060400000002711151376513700026164 0ustar00tagname = $tagname; $this->attributes = $attributes; $this->children = is_array($children) ? $children : array($children); } /** * Renders the element (override) * (non-PHPdoc) * @see SofortElement::render() */ public function render() { $output = ''; $attributes = ''; foreach ($this->children as $child) { $output .= is_object($child) ? $child->render() : $child; } foreach ($this->attributes as $key => $value) { $attributes .= " $key=\"$value\""; } return $this->_render($output, $attributes); } /** * * Render the output * @param string $output * @param string $attributes */ protected function _render($output, $attributes) { return $output !== '' ? "<{$this->tagname}{$attributes}>{$output}tagname}>" : "<{$this->tagname}{$attributes} />"; } } ?>