The DOMDocumentFragment class

(PHP 5, PHP 7, PHP 8)

类摘要

classDOMDocumentFragmentextendsDOMNodeimplementsDOMParentNode {
publicreadonlyint$childElementCount;
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()
publicappend(DOMNode|string...$nodes): void
publicappendXML(string$data): bool
publicprepend(DOMNode|string...$nodes): void
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
}

属性

childElementCount

The number of child elements.

firstElementChild

First child element or null.

lastElementChild

Last child element or null.

更新日志

版本说明
8.0.0 The firstElementChild, lastElementChild, and childElementCount properties have been added.
8.0.0DOMDocumentFragment implements DOMParentNode now.

目录

To Top