public function add(\DOMNodeList|\DOMNode|array|string|null
$node) { if ($node instanceof \DOMNodeList
) { $this->
addNodeList($node);
} elseif ($node instanceof \DOMNode
) { $this->
addNode($node);
} elseif (\
is_array($node)) { $this->
addNodes($node);
} elseif (\
is_string($node)) { $this->
addContent($node);
} elseif (null !==
$node) { throw new \
InvalidArgumentException(sprintf('Expecting a DOMNodeList or DOMNode instance, an array, a string, or null, but got "%s".',
get_debug_type($node)));
} } /**
* Adds HTML/XML content.
*
* If the charset is not set via the content type, it is assumed to be UTF-8,
* or ISO-8859-1 as a fallback, which is the default charset defined by the
* HTTP 1.1 specification.
*
* @return void
*/