| Methods |
public
|
__construct(DOMDocument $dom)
Class constructor
Parameters
| $dom |
the main DomDocument object representing the current html document
|
|
#
|
public
|
get_dom(): DOMDocument
Returns the DOMDocument object representing the current html document
Returns the DOMDocument object representing the current html document
|
#
|
public
|
get_root(): Frame
Returns the root frame of the tree
Returns the root frame of the tree
|
#
|
public
|
get_frame(string $id): Frame|null
Returns a specific frame given its id
Returns a specific frame given its id
|
#
|
public
|
get_frames(): FrameTreeIterator
Returns a post-order iterator for all frames in the tree
Returns a post-order iterator for all frames in the tree
Deprecated
Iterate the tree directly instead
|
#
|
public
|
getIterator(): FrameTreeIterator
Returns a post-order iterator for all frames in the tree
Returns a post-order iterator for all frames in the tree
Implements
|
#
|
public
|
build_tree()
Builds the tree
|
#
|
protected
|
fix_tables()
Adds missing TBODYs around TR
Adds missing TBODYs around TR
|
#
|
protected
|
_remove_node(DOMNode $node, array &$children, int $index)
Remove a child from a node
Remove a child from a node
Remove a child from a node. If the removed node results in two
adjacent #text nodes then combine them.
Parameters
| $node |
the current DOMNode being considered
|
| $children |
an array of nodes that are the children of $node
|
| $index |
index from the $children array of the node to remove
|
|
#
|
protected
|
_build_tree_r(DOMNode $node): Frame
Recursively adds {@link Frame} objects to the tree
Recursively adds {@link Frame} objects to the tree
Recursively build a tree of Frame objects based on a dom tree.
No layout information is calculated at this time, although the
tree may be adjusted (i.e. nodes and frames for generated content
and images may be created).
Parameters
| $node |
the current DOMNode being considered
|
|
#
|
public
|
insert_node(DOMElement $node, DOMElement $new_node, string $pos): mixed
|
#
|