La classe DOMText

(PHP 5, PHP 7, PHP 8)

Introduction

La classe DOMText hérite de DOMCharacterData et représente le contenu textuel de DOMElement ou DOMAttr.

Synopsis de la classe

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
}

Propriétés

wholeText

Contient tout le texte des nœuds de texte adjacents (c'est à dire, des nœuds qui ne sont pas séparés par des balises Element, Comment ou Processing Instruction).

Historique

VersionDescription
8.0.0 La méthode non implémentée DOMText::replaceWholeText() a été supprimée.

Sommaire

To Top