Forum PHP 2025

The Dom\DocumentFragment class

(PHP 8 >= 8.4.0)

はじめに

This represents a document fragment, which can be used as a container for other nodes.

This is the modern, spec-compliant equivalent of DOMDocumentFragment.

クラス概要

class Dom\DocumentFragment extends Dom\Node implements Dom\ParentNode {
/* 継承した定数 */
/* プロパティ */
public readonly ?Dom\Element $lastElementChild;
public readonly int $childElementCount;
/* 継承したプロパティ */
public readonly int $nodeType;
public readonly string $nodeName;
public readonly string $baseURI;
public readonly bool $isConnected;
public readonly ?Dom\Document $ownerDocument;
public readonly ?Dom\Node $parentNode;
public readonly ?Dom\Element $parentElement;
public readonly Dom\NodeList $childNodes;
public readonly ?Dom\Node $firstChild;
public readonly ?Dom\Node $lastChild;
public readonly ?Dom\Node $previousSibling;
public readonly ?Dom\Node $nextSibling;
/* メソッド */
/* Not documented yet */
/* 継承したメソッド */
/* Not documented yet */
}

プロパティ

firstElementChild

最初の子要素。存在しない場合は null になります。

lastElementChild

最後の子要素。存在しない場合は null になります。

childElementCount

子要素の数。

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top