<?php

namespace Planaday\Html\Nodes;

use DOMElement;
use Planaday\Html\NodeTags\Tag;

interface ParserNode {
	/**
	 * @return DOMElement&ParserNode
	 * @throws NodeCouldNotBeCreatedException
	 */
	public function getUsableDocumentFragment(): DOMElement&ParserNode;

	/**
	 * @param string $template
	 *
	 * @return DOMElement&ParserNode
	 * @throws NodeCouldNotBeCreatedException
	 */
	public function getNodeFromTemplate(string $template): DOMElement&ParserNode;
	public function getExtendedNodeData(): ?NodeData;
	public function setExtendedNodeData(?NodeData $nodeData): void;
	public function setAssociatedTag(?Tag $tag): void;
	public function getAssociatedTag(): ?Tag;
	public function destroyPhpReferences(): void;
}