ListBullet
extends AbstractFrameDecorator
in package
Decorates frames for list bullet rendering
Table of Contents
- BULLET_DESCENT = 0.3
- BULLET_PADDING = 1
- BULLET_SIZE = 0.35
- BULLET_THICKNESS = 0.04
- DEFAULT_COUNTER = "-dompdf-default-counter"
- WS_SPACE = 2
- WS_TEXT = 1
- $_already_pushed : bool
- Tells whether the frame was already pushed to the next page
- $_counters : mixed
- $_float_next_line : bool
- $_splitted : bool
- Tells whether the frame was split
- $_ws_state : int
- $BULLET_TYPES : mixed
- $ID_COUNTER : mixed
- Unique id counter
- $_containing_block : array<string|int, float>
- This frame's containing block (used in layout): array(x, y, w, h)
- $_containing_line : LineBox
- This frame's containing line box
- $_decorator : AbstractFrameDecorator
- This frame's decorator
- $_dompdf : Dompdf
- Reference to the current dompdf instance
- $_first_child : Frame
- This frame's first child. All children are handled as a doubly-linked list.
- $_frame : Frame
- The decorated frame
- $_frame_list : array<string|int, Frame>
- This frame's children
- $_id : string
- Unique identifier for this frame. Used to reference this frame via the node.
- $_is_cache : array<string|int, mixed>
- $_last_child : Frame
- This frame's last child.
- $_next_sibling : Frame
- This frame's next sibling in the document tree.
- $_node : DOMElement|DOMText
- The DOMElement or DOMText object this frame represents
- $_opacity : float
- Absolute opacity of this frame
- $_original_style : Style
- This frame's original style. Needed for cases where frames are split across pages.
- $_parent : Frame
- This frame's parent in the document tree.
- $_position : array<string|int, float>
- Position on the page of the top-left corner of the margin box of this frame: array(x,y)
- $_positioner : AbstractPositioner
- AbstractPositioner object used to position this frame (Strategy pattern)
- $_prev_sibling : Frame
- This frame's previous sibling in the document tree.
- $_reflower : AbstractFrameReflower
- Reflower object used to calculate frame dimensions (Strategy pattern)
- $_root : Frame
- The root node of the DOM tree
- $_style : Style
- This frame's calculated style
- $_block_parent : Block
- First block parent
- $_cached_parent : Frame
- Cache for the get_parent while loop results
- $_positionned_parent : AbstractFrameDecorator
- First positionned parent (position: relative | absolute | fixed)
- __construct() : mixed
- ListBullet constructor.
- __toString() : string
- append_child() : mixed
- Inserts a new child at the end of the Frame
- calculate_auto_width() : float
- Determine current frame width based on contents
- copy() : Frame
- Return a copy of this frame with $node as its node
- counter_value() : bool|string
- decrement_counters() : mixed
- deep_copy() : Frame
- Create a deep copy: copy this node and all children
- dispose() : mixed
- "Destructor": forcibly free all references held by this frame
- find_block_parent() : Block
- find_positionned_parent() : AbstractFrameDecorator
- get_border_box() : array<string|int, mixed>
- Return the border box of the frame
- get_break_margins() : float
- get_children() : FrameList|array<string|int, Frame>
- get_containing_block() : array<string|int, float>|float
- Containing block dimensions
- get_containing_line() : LineBox
- get_content_box() : array<string|int, mixed>
- Return the content box (x,y,w,h) of the frame
- get_decorator() : AbstractFrameDecorator
- get_dompdf() : Dompdf
- get_first_child() : Frame
- get_frame() : Frame
- get_height() : float|int
- get_id() : string
- get_last_child() : Frame
- get_margin_height() : float|int
- hits only on "inset" lists items, to increase height of box
- get_margin_width() : float|int
- Return the width of the margin box of the frame, in pt. Meaningless unless the width has been calculated properly.
- get_min_max_width() : array<string|int, mixed>
- get_next_sibling() : Frame
- get_node() : DOMElement|DOMText
- get_opacity() : float
- get_original_style() : Style
- get_padding_box() : array<string|int, mixed>
- Return the padding box (x,y,w,h) of the frame
- get_parent() : Frame
- get_position() : array<string|int, mixed>|float
- Block position
- get_prev_sibling() : Frame
- get_reflower() : AbstractFrameReflower
- get_root() : Page
- get_style() : Style
- get_subtree() : FrameTreeList
- get_width() : float|int
- increment_counter() : mixed
- increment_counters() : mixed
- insert_child_after() : mixed
- Inserts a new child immediately after the specified frame
- insert_child_before() : mixed
- Inserts a new child immediately before the specified frame
- is_absolute() : bool
- is_auto_height() : bool
- Indicates if the margin height is auto sized
- is_auto_width() : bool
- Indicates if the margin width is auto sized
- is_block() : bool
- is_in_flow() : bool
- is_inline_block() : bool
- is_positionned() : bool
- is_pre() : bool
- is_table() : bool
- is_text_node() : bool
- Tells if the frame is a text node
- lookup_counter_frame() : AbstractFrameDecorator|null
- move() : mixed
- position() : mixed
- prepend_child() : mixed
- Inserts a new child at the beginning of the Frame
- reflow() : mixed
- remove_child() : Frame
- Remove a child frame
- reset() : mixed
- Re-initialize the frame
- reset_counter() : mixed
- set_containing_block() : mixed
- set_containing_line() : mixed
- set_decorator() : mixed
- set_id() : mixed
- set_opacity() : mixed
- set_position() : mixed
- set_positioner() : mixed
- set_reflower() : mixed
- set_root() : mixed
- set_style() : mixed
- split() : void
- split this frame at $child.
- ws_is_text() : bool
- ws_keep() : bool
- ws_trim() : mixed
- WIP : preprocessing to remove all the unused whitespace
Constants
BULLET_DESCENT
public
mixed
BULLET_DESCENT
= 0.3
BULLET_PADDING
public
mixed
BULLET_PADDING
= 1
BULLET_SIZE
public
mixed
BULLET_SIZE
= 0.35
BULLET_THICKNESS
public
mixed
BULLET_THICKNESS
= 0.04
DEFAULT_COUNTER
public
mixed
DEFAULT_COUNTER
= "-dompdf-default-counter"
WS_SPACE
public
mixed
WS_SPACE
= 2
WS_TEXT
public
mixed
WS_TEXT
= 1
Properties
$_already_pushed
Tells whether the frame was already pushed to the next page
public
bool
$_already_pushed
= false
$_counters
public
mixed
$_counters
= []
$_float_next_line
public
bool
$_float_next_line
= false
$_splitted
Tells whether the frame was split
public
bool
$_splitted
$_ws_state
public
static int
$_ws_state
= self::WS_SPACE
$BULLET_TYPES
public
static mixed
$BULLET_TYPES
= ["disc", "circle", "square"]
$ID_COUNTER
Unique id counter
public
static mixed
$ID_COUNTER
= 0
$_containing_block
This frame's containing block (used in layout): array(x, y, w, h)
protected
array<string|int, float>
$_containing_block
$_containing_line
This frame's containing line box
protected
LineBox
$_containing_line
$_decorator
This frame's decorator
protected
AbstractFrameDecorator
$_decorator
$_dompdf
Reference to the current dompdf instance
protected
Dompdf
$_dompdf
$_first_child
This frame's first child. All children are handled as a doubly-linked list.
protected
Frame
$_first_child
$_frame
The decorated frame
protected
Frame
$_frame
$_frame_list
This frame's children
protected
array<string|int, Frame>
$_frame_list
$_id
Unique identifier for this frame. Used to reference this frame via the node.
protected
string
$_id
$_is_cache
protected
array<string|int, mixed>
$_is_cache
= []
$_last_child
This frame's last child.
protected
Frame
$_last_child
$_next_sibling
This frame's next sibling in the document tree.
protected
Frame
$_next_sibling
$_node
The DOMElement or DOMText object this frame represents
protected
DOMElement|DOMText
$_node
$_opacity
Absolute opacity of this frame
protected
float
$_opacity
$_original_style
This frame's original style. Needed for cases where frames are split across pages.
protected
Style
$_original_style
$_parent
This frame's parent in the document tree.
protected
Frame
$_parent
$_position
Position on the page of the top-left corner of the margin box of this frame: array(x,y)
protected
array<string|int, float>
$_position
$_positioner
AbstractPositioner object used to position this frame (Strategy pattern)
protected
AbstractPositioner
$_positioner
$_prev_sibling
This frame's previous sibling in the document tree.
protected
Frame
$_prev_sibling
$_reflower
Reflower object used to calculate frame dimensions (Strategy pattern)
protected
AbstractFrameReflower
$_reflower
$_root
The root node of the DOM tree
protected
Frame
$_root
$_style
This frame's calculated style
protected
Style
$_style
$_block_parent
First block parent
private
Block
$_block_parent
$_cached_parent
Cache for the get_parent while loop results
private
Frame
$_cached_parent
$_positionned_parent
First positionned parent (position: relative | absolute | fixed)
private
AbstractFrameDecorator
$_positionned_parent
Methods
__construct()
ListBullet constructor.
public
__construct(Frame $frame, Dompdf $dompdf) : mixed
Parameters
Return values
mixed —__toString()
public
__toString() : string
Return values
string —append_child()
Inserts a new child at the end of the Frame
public
append_child( $child[, $update_node = true ]) : mixed
Parameters
- $child :
-
Frame The new Frame to insert
- $update_node : = true
-
boolean Whether or not to update the DOM
Return values
mixed —calculate_auto_width()
Determine current frame width based on contents
public
final calculate_auto_width() : float
Return values
float —copy()
Return a copy of this frame with $node as its node
public
copy(DOMNode $node) : Frame
Parameters
- $node : DOMNode
Return values
Frame —counter_value()
public
counter_value([string $id = self::DEFAULT_COUNTER ][, string $type = "decimal" ]) : bool|string
Parameters
- $id : string = self::DEFAULT_COUNTER
- $type : string = "decimal"
Return values
bool|string —TODO: What version is the best : this one or the one in ListBullet ?
decrement_counters()
public
decrement_counters( $counters) : mixed
Parameters
Return values
mixed —deep_copy()
Create a deep copy: copy this node and all children
public
deep_copy() : Frame
Return values
Frame —dispose()
"Destructor": forcibly free all references held by this frame
public
dispose([bool $recursive = false ]) : mixed
Parameters
- $recursive : bool = false
-
if true, call dispose on all children
Return values
mixed —find_block_parent()
public
find_block_parent() : Block
Return values
Block —find_positionned_parent()
public
find_positionned_parent() : AbstractFrameDecorator
Return values
AbstractFrameDecorator —get_border_box()
Return the border box of the frame
public
get_border_box() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_break_margins()
public
get_break_margins() : float
Return values
float —get_children()
public
get_children() : FrameList|array<string|int, Frame>
Return values
FrameList|array<string|int, Frame> —get_containing_block()
Containing block dimensions
public
get_containing_block([ $i = null ]) : array<string|int, float>|float
Parameters
Return values
array<string|int, float>|float —get_containing_line()
public
get_containing_line() : LineBox
Return values
LineBox —get_content_box()
Return the content box (x,y,w,h) of the frame
public
get_content_box() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_decorator()
public
get_decorator() : AbstractFrameDecorator
Return values
AbstractFrameDecorator —get_dompdf()
public
get_dompdf() : Dompdf
Return values
Dompdf —get_first_child()
public
get_first_child() : Frame
Return values
Frame —get_frame()
public
get_frame() : Frame
Return values
Frame —get_height()
public
get_height() : float|int
Return values
float|int —get_id()
public
get_id() : string
Return values
string —get_last_child()
public
get_last_child() : Frame
Return values
Frame —get_margin_height()
hits only on "inset" lists items, to increase height of box
public
get_margin_height() : float|int
Return values
float|int —get_margin_width()
Return the width of the margin box of the frame, in pt. Meaningless unless the width has been calculated properly.
public
get_margin_width() : float|int
Return values
float|int —get_min_max_width()
public
final get_min_max_width() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_next_sibling()
public
get_next_sibling() : Frame
Return values
Frame —get_node()
public
get_node() : DOMElement|DOMText
Return values
DOMElement|DOMText —get_opacity()
public
get_opacity([null $opacity = null ]) : float
Parameters
- $opacity : null = null
Return values
float —get_original_style()
public
get_original_style() : Style
Return values
Style —get_padding_box()
Return the padding box (x,y,w,h) of the frame
public
get_padding_box() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_parent()
public
get_parent() : Frame
Return values
Frame —get_position()
Block position
public
get_position([ $i = null ]) : array<string|int, mixed>|float
Parameters
Return values
array<string|int, mixed>|float —get_prev_sibling()
public
get_prev_sibling() : Frame
Return values
Frame —get_reflower()
public
get_reflower() : AbstractFrameReflower
Return values
AbstractFrameReflower —get_root()
public
get_root() : Page
Return values
Page —get_style()
public
get_style() : Style
Return values
Style —get_subtree()
public
get_subtree() : FrameTreeList
Return values
FrameTreeList —get_width()
public
get_width() : float|int
Return values
float|int —increment_counter()
public
increment_counter([string $id = self::DEFAULT_COUNTER ][, int $increment = 1 ]) : mixed
Parameters
- $id : string = self::DEFAULT_COUNTER
- $increment : int = 1
Return values
mixed —increment_counters()
public
increment_counters( $counters) : mixed
Parameters
Return values
mixed —insert_child_after()
Inserts a new child immediately after the specified frame
public
insert_child_after( $new_child, $ref[, $update_node = true ]) : mixed
Parameters
- $new_child :
-
Frame The new Frame to insert
- $ref :
-
Frame The Frame before the new Frame
- $update_node : = true
-
boolean Whether or not to update the DOM
Tags
Return values
mixed —insert_child_before()
Inserts a new child immediately before the specified frame
public
insert_child_before( $new_child, $ref[, $update_node = true ]) : mixed
Parameters
- $new_child :
-
Frame The new Frame to insert
- $ref :
-
Frame The Frame after the new Frame
- $update_node : = true
-
boolean Whether or not to update the DOM
Tags
Return values
mixed —is_absolute()
public
is_absolute() : bool
Return values
bool —is_auto_height()
Indicates if the margin height is auto sized
public
is_auto_height() : bool
Return values
bool —is_auto_width()
Indicates if the margin width is auto sized
public
is_auto_width() : bool
Return values
bool —is_block()
public
is_block() : bool
Return values
bool —is_in_flow()
public
is_in_flow() : bool
Return values
bool —is_inline_block()
public
is_inline_block() : bool
Return values
bool —is_positionned()
public
is_positionned() : bool
Return values
bool —is_pre()
public
is_pre() : bool
Return values
bool —is_table()
public
is_table() : bool
Return values
bool —is_text_node()
Tells if the frame is a text node
public
is_text_node() : bool
Return values
bool —lookup_counter_frame()
public
lookup_counter_frame([string $id = self::DEFAULT_COUNTER ]) : AbstractFrameDecorator|null
Parameters
- $id : string = self::DEFAULT_COUNTER
Return values
AbstractFrameDecorator|null —move()
public
final move( $offset_x, $offset_y[, bool $ignore_self = false ]) : mixed
Parameters
Return values
mixed —position()
public
final position() : mixed
Return values
mixed —prepend_child()
Inserts a new child at the beginning of the Frame
public
prepend_child( $child[, $update_node = true ]) : mixed
Parameters
- $child :
-
Frame The new Frame to insert
- $update_node : = true
-
boolean Whether or not to update the DOM
Return values
mixed —reflow()
public
final reflow([Block|null $block = null ]) : mixed
Parameters
- $block : Block|null = null
Return values
mixed —remove_child()
Remove a child frame
public
remove_child(Frame $child[, bool $update_node = true ]) : Frame
Parameters
- $child : Frame
- $update_node : bool = true
-
Whether or not to remove the DOM node
Tags
Return values
Frame —The removed child frame
reset()
Re-initialize the frame
public
reset() : mixed
Return values
mixed —reset_counter()
public
reset_counter([string $id = self::DEFAULT_COUNTER ], int $value) : mixed
Parameters
- $id : string = self::DEFAULT_COUNTER
- $value : int
Return values
mixed —set_containing_block()
public
set_containing_block([null $x = null ][, null $y = null ][, null $w = null ][, null $h = null ]) : mixed
Parameters
- $x : null = null
- $y : null = null
- $w : null = null
- $h : null = null
Return values
mixed —set_containing_line()
public
set_containing_line(LineBox $line) : mixed
Parameters
- $line : LineBox
Return values
mixed —set_decorator()
public
set_decorator(AbstractFrameDecorator $decorator) : mixed
Parameters
- $decorator : AbstractFrameDecorator
Return values
mixed —set_id()
public
set_id( $id) : mixed
Parameters
Return values
mixed —set_opacity()
public
set_opacity( $opacity) : mixed
Parameters
Return values
mixed —set_position()
public
set_position([null $x = null ][, null $y = null ]) : mixed
Parameters
- $x : null = null
- $y : null = null
Return values
mixed —set_positioner()
public
set_positioner(AbstractPositioner $posn) : mixed
Parameters
- $posn : AbstractPositioner
Return values
mixed —set_reflower()
public
set_reflower(AbstractFrameReflower $reflower) : mixed
Parameters
- $reflower : AbstractFrameReflower
Return values
mixed —set_root()
public
set_root(Frame $root) : mixed
Parameters
- $root : Frame
Return values
mixed —set_style()
public
set_style(Style $style) : mixed
Parameters
- $style : Style
Return values
mixed —split()
split this frame at $child.
public
split([Frame $child = null ][, bool $force_pagebreak = false ]) : void
The current frame is cloned and $child and all children following $child are added to the clone. The clone is then passed to the current frame's parent->split() method.
Parameters
- $child : Frame = null
- $force_pagebreak : bool = false
Tags
Return values
void —ws_is_text()
protected
ws_is_text() : bool
Return values
bool —ws_keep()
protected
ws_keep() : bool
Return values
bool —ws_trim()
WIP : preprocessing to remove all the unused whitespace
protected
ws_trim() : mixed