<?php

declare(strict_types=1);

namespace App\Framework\View\Dom;

interface Node
{
    public function getNodeType(): NodeType;

    public function getNodeName(): string;

    public function getTextContent(): string;

    public function getParent(): ?Node;

    public function setParent(?Node $parent): void;

    /**
     * @return array<Node>
     */
    public function getChildren(): array;

    public function appendChild(Node $child): void;

    public function removeChild(Node $child): void;

    public function accept(NodeVisitor $visitor): void;

    public function clone(): self;
}
