Dompdf\Frame\FrameTree
Represents an entire document as a tree of frames
The FrameTree consists of objects each tied to specific
DOMNode objects in a specific DomDocument. The FrameTree has the same
structure as the DomDocument, but adds additional capabalities for
styling and layout.
Synopsis
class FrameTree
{
- // members
- protected static array $HIDDEN_TAGS = ;
- protected DOMDocument $_dom;
- protected Frame $_root;
- protected $_absolute_frames;
- protected $_registry;
- // methods
- public void __construct()
- public DOMDocument get_dom()
- public Frame get_root()
- public Frame|null get_frame()
- public array get_frames()
- public void build_tree()
- protected void fix_tables()
- protected void _remove_node()
- protected Frame _build_tree_r()
- public mixed insert_node()
Members
protected
- $HIDDEN_TAGS
—
array
Tags to ignore while parsing the tree - $_absolute_frames
—
array
Subtrees of absolutely positioned elements - $_dom
—
DOMDocument
The main DomDocument - $_registry
—
array
A mapping of {@link Frame} objects to DOMNode objects - $_root
—
Dompdf\Frame
The root node of the FrameTree.
Methods
protected
- _build_tree_r() — Recursively adds {@link Frame} objects to the tree
- _remove_node() — Remove a child from a node
- fix_tables() — Adds missing TBODYs around TR
public
- __construct() — Class constructor
- build_tree() — Builds the tree
- get_dom() — Returns the DOMDocument object representing the curent html document
- get_frame() — Returns a specific frame given its id
- get_frames() — Returns a post-order iterator for all frames in the tree
- get_root() — Returns the root frame of the tree
- insert_node()