| Server IP : 85.158.181.41 / Your IP : 216.73.217.12 Web Server : Apache System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64 User : moncbefd ( 1024) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/moncbefd/www.moneta.at/callback/sofort/library/helper/elements/ |
Upload File : |
<?php
class SofortTag extends SofortElement {
public $tagname = '';
public $attributes = array();
public $children = array();
public function __construct($tagname, array $attributes = array(), $children = array()) {
$this->tagname = $tagname;
$this->attributes = $attributes;
$this->children = is_array($children) ? $children : array($children);
}
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);
}
protected function _render($output, $attributes) {
return $output !== '' ? "<{$this->tagname}{$attributes}>{$output}</{$this->tagname}>" : "<{$this->tagname}{$attributes} />";
}
}
?>