|
static | hasNChildren (Node $node, int $nchildren, bool $countDiffMarkers=false) |
| Test the number of children this node has without using DOMNode::$childNodes->count() .
|
|
static | firstNonSepChild (Node $node) |
| Get the first child element or non-IEW text node, ignoring whitespace-only text nodes, comments, and deleted nodes.
|
|
static | nextNonSepSibling (Node $node) |
| Get the next non separator sibling node.
|
|
◆ firstNonSepChild()
static Wikimedia\Parsoid\Ext\DiffDOMUtils::firstNonSepChild |
( |
Node | $node | ) |
|
|
static |
Get the first child element or non-IEW text node, ignoring whitespace-only text nodes, comments, and deleted nodes.
- Parameters
-
- Returns
- Node|null
◆ hasNChildren()
static Wikimedia\Parsoid\Ext\DiffDOMUtils::hasNChildren |
( |
Node | $node, |
|
|
int | $nchildren, |
|
|
bool | $countDiffMarkers = false ) |
|
static |
Test the number of children this node has without using DOMNode::$childNodes->count()
.
This walks the sibling list and so takes O(nchildren
) time – so nchildren
is expected to be small (say: 0, 1, or 2).
Skips all diff markers by default.
- Parameters
-
Node | $node | |
int | $nchildren | |
bool | $countDiffMarkers | |
- Returns
- bool
◆ nextNonSepSibling()
static Wikimedia\Parsoid\Ext\DiffDOMUtils::nextNonSepSibling |
( |
Node | $node | ) |
|
|
static |
Get the next non separator sibling node.
- Parameters
-
- Returns
- Node|null
The documentation for this class was generated from the following file: