Documentation

Block extends AbstractFrameReflower
in package

Reflows block frames

Table of Contents

MIN_JUSTIFY_WIDTH  = 0.8
$_frame  : Block
Frame for this reflower
$_min_max_cache  : array<string|int, mixed>
Cached min/max size
__construct()  : mixed
AbstractFrameReflower constructor.
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.
process_clear()  : mixed
process_float()  : mixed
reflow()  : mixed|void
vertical_align()  : mixed
Align inline children vertically.
_calculate_content_height()  : float
Determine the unrestricted height of content within the block not by adding each line's height, but by getting the last line's position.
_calculate_restricted_height()  : array<string|int, mixed>
Determine the frame's restricted height
_calculate_restricted_width()  : array<string|int, mixed>
Call the above function, but resolve max/min widths
_calculate_width()  : array<string|int, mixed>
Calculate the ideal used value for the width property as per: http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins
_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
_text_align()  : mixed
Adjust the justification of each of our lines.
_get_collapsed_margin_length()  : number
Get the combined (collapsed) length of two adjoining margins.

Constants

MIN_JUSTIFY_WIDTH

public mixed MIN_JUSTIFY_WIDTH = 0.8

Properties

$_frame

Frame for this reflower

protected Block $_frame

Methods

__construct()

AbstractFrameReflower constructor.

public __construct(Block $frame) : mixed
Parameters
$frame : Block
Return values
mixed

calculate_auto_width()

Determine current frame width based on contents

public calculate_auto_width() : float
Return values
float

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

process_clear()

public process_clear(Frame $child) : mixed
Parameters
$child : Frame
Return values
mixed

process_float()

public process_float(Frame $child, float $cb_x, float $cb_w) : mixed
Parameters
$child : Frame
$cb_x : float
$cb_w : float
Return values
mixed

reflow()

public reflow([Block $block = null ]) : mixed|void
Parameters
$block : Block = null
Return values
mixed|void

vertical_align()

Align inline children vertically.

public vertical_align() : mixed

Aligns each child vertically after each line is reflowed

Return values
mixed

_calculate_content_height()

Determine the unrestricted height of content within the block not by adding each line's height, but by getting the last line's position.

protected _calculate_content_height() : float

This because lines could have been pushed lower by a clearing element.

Return values
float

_calculate_restricted_height()

Determine the frame's restricted height

protected _calculate_restricted_height() : array<string|int, mixed>
Return values
array<string|int, mixed>

_calculate_restricted_width()

Call the above function, but resolve max/min widths

protected _calculate_restricted_width() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

_calculate_width()

Calculate the ideal used value for the width property as per: http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins

protected _calculate_width(float $width) : array<string|int, mixed>
Parameters
$width : float
Return values
array<string|int, 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
$string :

string The CSS string to parse

$single_trim : = false
Return values
string

_set_content()

Sets the generated content of a generated frame

protected _set_content() : mixed
Return values
mixed

_text_align()

Adjust the justification of each of our lines.

protected _text_align() : mixed

http://www.w3.org/TR/CSS21/text.html#propdef-text-align

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
Return values
number

Search results