The DOMEntity class

Introduction

This interface represents a known entity, either parsed or unparsed, in an XML document.

Class synopsis

DOMEntity
extends DOMNode
/* Inherited constants */
public const int DOMNode::DOCUMENT_POSITION_DISCONNECTED = 0x1;
public const int DOMNode::DOCUMENT_POSITION_PRECEDING = 0x2;
public const int DOMNode::DOCUMENT_POSITION_FOLLOWING = 0x4;
public const int DOMNode::DOCUMENT_POSITION_CONTAINS = 0x8;
public const int DOMNode::DOCUMENT_POSITION_CONTAINED_BY = 0x10;
public const int DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
/* Properties */
public readonly stringnull $publicId;
public readonly stringnull $systemId;
public readonly stringnull $notationName;
public readonly stringnull $actualEncoding;
public readonly stringnull $encoding;
public readonly stringnull $version;
/* Inherited properties */
public readonly string $nodeName;
public stringnull $nodeValue;
public readonly int $nodeType;
public readonly DOMNodenull $parentNode;
public readonly DOMElementnull $parentElement;
public readonly DOMNodeList $childNodes;
public readonly DOMNodenull $firstChild;
public readonly DOMNodenull $lastChild;
public readonly DOMNodenull $previousSibling;
public readonly DOMNodenull $nextSibling;
public readonly DOMNamedNodeMapnull $attributes;
public readonly bool $isConnected;
public readonly DOMDocumentnull $ownerDocument;
public readonly stringnull $namespaceURI;
public string $prefix;
public readonly stringnull $localName;
public readonly stringnull $baseURI;
public string $textContent;
/* Inherited methods */
public DOMNodefalse appendChild(DOMNode $node)
public stringfalse C14N(
    bool $exclusive = false,
    bool $withComments = false,
    arraynull $xpath = null,
    arraynull $nsPrefixes = null
)
public intfalse C14NFile(
    string $uri,
    bool $exclusive = false,
    bool $withComments = false,
    arraynull $xpath = null,
    arraynull $nsPrefixes = null
)
public DOMNodefalse cloneNode(bool $deep = false)
public int compareDocumentPosition(DOMNode $other)
public bool contains(DOMNodeDOMNameSpaceNodenull $other)
public int getLineNo()
public stringnull getNodePath()
public DOMNode getRootNode(arraynull $options = null)
public bool hasAttributes()
public bool hasChildNodes()
public DOMNodefalse insertBefore(DOMNode $node, DOMNodenull $child = null)
public bool isDefaultNamespace(string $namespace)
public bool isEqualNode(DOMNodenull $otherNode)
public bool isSameNode(DOMNode $otherNode)
public bool isSupported(string $feature, string $version)
public stringnull lookupNamespaceURI(stringnull $prefix)
public stringnull lookupPrefix(string $namespace)
public void normalize()
public DOMNodefalse removeChild(DOMNode $child)
public DOMNodefalse replaceChild(DOMNode $node, DOMNode $child)
public array __sleep()
public void __wakeup()

Properties

publicId

The public identifier associated with the entity if specified, and null otherwise.

systemId

The system identifier associated with the entity if specified, and null otherwise. This may be an absolute URI or not.

notationName

For unparsed entities, the name of the notation for the entity. For parsed entities, this is null.

actualEncoding

Deprecated as of PHP 8.4.0. This has always been equal to null.

encoding

Deprecated as of PHP 8.4.0. This has always been equal to null.

version

Deprecated as of PHP 8.4.0. This has always been equal to null.

Changelog

Version Description
8.4.0 actualEncoding, encoding, and version are formally deprecated now because they have always been equal to null.