Page
extends AbstractFrameReflower
in package
Reflows pages
Table of Contents
- $_frame : Frame
- Frame for this reflower
- $_min_max_cache : array<string|int, mixed>
- Cached min/max size
- $_callbacks : array<string|int, mixed>
- Cache of the callbacks array
- $_canvas : Canvas
- Cache of the canvas
- __construct() : mixed
- Page constructor.
- apply_page_style() : mixed
- calculate_auto_width() : float
- Determine current frame width based on contents
- dispose() : mixed
- get_dompdf() : Dompdf
- get_min_max_width() : array<string|int, mixed>|null
- Required for table layout: Returns an array(0 => min, 1 => max, "min" => min, "max" => max) of the minimum and maximum widths of this frame.
- reflow() : mixed
- Paged layout: http://www.w3.org/TR/CSS21/page.html
- _check_callbacks() : mixed
- Check for callbacks that need to be performed when a given event gets triggered on a page
- _collapse_margins() : mixed
- Collapse frames margins http://www.w3.org/TR/CSS2/box.html#collapsing-margins
- _parse_content() : string|null
- Parses the CSS "content" property
- _parse_quotes() : array<string|int, mixed>|null
- Parses a CSS "quotes" property
- _parse_string() : string
- Parses a CSS string containing quotes and escaped hex characters
- _set_content() : mixed
- Sets the generated content of a generated frame
- _get_collapsed_margin_length() : number
- Get the combined (collapsed) length of two adjoining margins.
Properties
$_frame
Frame for this reflower
protected
Frame
$_frame
$_min_max_cache
Cached min/max size
protected
array<string|int, mixed>
$_min_max_cache
$_callbacks
Cache of the callbacks array
private
array<string|int, mixed>
$_callbacks
$_canvas
Cache of the canvas
private
Canvas
$_canvas
Methods
__construct()
Page constructor.
public
__construct(Page $frame) : mixed
Parameters
- $frame : Page
Return values
mixed —apply_page_style()
public
apply_page_style(Frame $frame, $page_number) : mixed
Parameters
- $frame : Frame
- $page_number :
Return values
mixed —calculate_auto_width()
Determine current frame width based on contents
public
calculate_auto_width() : float
Return values
float —dispose()
public
dispose() : mixed
Return values
mixed —get_dompdf()
public
get_dompdf() : Dompdf
Return values
Dompdf —get_min_max_width()
Required for table layout: Returns an array(0 => min, 1 => max, "min" => min, "max" => max) of the minimum and maximum widths of this frame.
public
get_min_max_width() : array<string|int, mixed>|null
This provides a basic implementation. Child classes should override this if necessary.
Return values
array<string|int, mixed>|null —reflow()
Paged layout: http://www.w3.org/TR/CSS21/page.html
public
reflow([Block|null $block = null ]) : mixed
Parameters
- $block : Block|null = null
Return values
mixed —_check_callbacks()
Check for callbacks that need to be performed when a given event gets triggered on a page
protected
_check_callbacks(string $event, Frame $frame) : mixed
Parameters
- $event : string
-
the type of event
- $frame : Frame
-
the frame that event is triggered on
Return values
mixed —_collapse_margins()
Collapse frames margins http://www.w3.org/TR/CSS2/box.html#collapsing-margins
protected
_collapse_margins() : mixed
Return values
mixed —_parse_content()
Parses the CSS "content" property
protected
_parse_content() : string|null
Return values
string|null —The resulting string
_parse_quotes()
Parses a CSS "quotes" property
protected
_parse_quotes() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —An array of pairs of quotes
_parse_string()
Parses a CSS string containing quotes and escaped hex characters
protected
_parse_string( $string[, $single_trim = false ]) : string
Parameters
Return values
string —_set_content()
Sets the generated content of a generated frame
protected
_set_content() : mixed
Return values
mixed —_get_collapsed_margin_length()
Get the combined (collapsed) length of two adjoining margins.
private
_get_collapsed_margin_length(number $length1, number $length2) : number
See http://www.w3.org/TR/CSS2/box.html#collapsing-margins.
Parameters
- $length1 : number
- $length2 : number