getEncoding();
foreach ((array) $attribs as $key => $val) {
$key = htmlspecialchars($key, ENT_COMPAT, $enc);
if (is_array($val)) {
if (array_key_exists('callback', $val)
&& is_callable($val['callback'])
) {
$val = call_user_func($val['callback']);
} else {
$val = implode(' ', $val);
}
}
$val = htmlspecialchars($val, ENT_COMPAT, $enc);
$xhtml .= " $key=\"$val\"";
}
return $xhtml;
}
public static function renderContainer($tag, $content, array $attribs = array())
{
return '<' . $tag . self::renderAttribs($attribs) . '>' . $content . '' . $tag . '>';
}
}