The DOMText class

(PHP 5, PHP 7, PHP 8)

Introduction

The DOMText class inherits from DOMCharacterData and represents the textual content of a DOMElement or DOMAttr.

Class synopsis

classDOMTextextendsDOMCharacterData {
publicreadonlystring$wholeText;
publicreadonlyint$length;
publicreadonlystring$nodeName;
publicreadonlyint$nodeType;
publicreadonly?DOMNode$parentNode;
publicreadonly?DOMElement$parentElement;
publicreadonlyDOMNodeList$childNodes;
publicreadonly?DOMNode$firstChild;
publicreadonly?DOMNode$lastChild;
publicreadonly?DOMNode$previousSibling;
publicreadonly?DOMNode$nextSibling;
publicreadonlybool$isConnected;
publicreadonly?string$namespaceURI;
publicreadonly?string$localName;
publicreadonly?string$baseURI;
public__construct(string$data = "")
publicsplitText(int$offset): DOMText|false
publicDOMCharacterData::replaceData(int$offset, int$count, string$data): bool
publicDOMNode::C14N(
    bool$exclusive = false,
    bool$withComments = false,
    ?array$xpath = null,
    ?array$nsPrefixes = null
): string|false
publicDOMNode::C14NFile(
    string$uri,
    bool$exclusive = false,
    bool$withComments = false,
    ?array$xpath = null,
    ?array$nsPrefixes = null
): int|false
publicDOMNode::isSameNode(DOMNode$otherNode): bool
publicDOMNode::isSupported(string$feature, string$version): bool
}

Properties

wholeText

Holds all the text of logically-adjacent (not separated by Element, Comment or Processing Instruction) Text nodes.

Changelog

VersionDescription
8.0.0 The unimplemented method DOMText::replaceWholeText() has been removed.

Table of Contents

To Top