FluentDOM\Document::appendAttributes PHP Méthode

appendAttributes() private méthode

private appendAttributes ( DOMElement $node, string | array | null $content = NULL, array $attributes = NULL )
$node DOMElement
$content string | array | null
$attributes array
    private function appendAttributes($node, $content = NULL, array $attributes = NULL)
    {
        if (is_array($content)) {
            $attributes = NULL === $attributes ? $content : array_merge($content, $attributes);
        }
        if (!empty($attributes)) {
            foreach ($attributes as $attributeName => $attributeValue) {
                $node->setAttribute($attributeName, $attributeValue);
            }
        }
    }