PHP 8.5.0 Beta 3 available for testing

Dom\DocumentFragment クラス

(PHP 8 >= 8.4.0)

はじめに

このクラスは、ドキュメントのフラグメントを表します。 フラグメントは、他のノードのコンテナとして使えます。

このクラスは、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