protected implodeNode ( $node ) : string | ||
return | string | tag name and attribute names and values. |
protected function implodeNode($node)
{
$attributes = array();
foreach ($node->attributes() as $k => $v) {
$attributes[] = $k . '="' . (string) $v . '"';
}
return '<' . $node->getName() . ' ' . implode(' ', $attributes) . '>';
}