Documentation

Text extends AbstractFrameReflower
in package

Reflows text frames.

Table of Contents

$_whitespace_pattern  : mixed
$_wordbreak_pattern  : mixed
$_block_parent  : Block
$_frame  : Text
Frame for this reflower
$_min_max_cache  : array<string|int, mixed>
Cached min/max size
$fontMetrics  : FontMetrics
__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.
getFontMetrics()  : FontMetrics
reflow()  : mixed
setFontMetrics()  : $this
_collapse_margins()  : mixed
Collapse frames margins http://www.w3.org/TR/CSS2/box.html#collapsing-margins
_collapse_white_space()  : mixed
_layout_line()  : bool
_line_break()  : bool|int
_newline_break()  : bool|int
_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

$_whitespace_pattern

public static mixed $_whitespace_pattern = '/([^\S\xA0]+)/u'

$_wordbreak_pattern

public static mixed $_wordbreak_pattern = '/([^\S\xA0]+|-+)/u'

$_frame

Frame for this reflower

protected Text $_frame

Methods

__construct()

AbstractFrameReflower constructor.

public __construct(Text $frame, FontMetrics $fontMetrics) : mixed
Parameters
$frame : Text
$fontMetrics : FontMetrics
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

reflow()

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

setFontMetrics()

public setFontMetrics(FontMetrics $fontMetrics) : $this
Parameters
$fontMetrics : FontMetrics
Return values
$this

_collapse_margins()

Collapse frames margins http://www.w3.org/TR/CSS2/box.html#collapsing-margins

protected _collapse_margins() : mixed
Return values
mixed

_collapse_white_space()

protected _collapse_white_space( $text) : mixed
Parameters
$text :
Return values
mixed

_layout_line()

protected _layout_line() : bool
Return values
bool

_line_break()

protected _line_break( $text) : bool|int
Parameters
$text :
Return values
bool|int

_newline_break()

protected _newline_break( $text) : bool|int
Parameters
$text :
Return values
bool|int

_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

_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