Documentation

HTML5_TreeBuilder
in package

Table of Contents

AFTER_AFTER_BODY  = 21
AFTER_AFTER_FRAMESET  = 22
AFTER_BODY  = 18
AFTER_FRAMESET  = 20
AFTER_HEAD  = 5
BEFORE_HEAD  = 2
BEFORE_HTML  = 1
FORMATTING  = 102
IN_BODY  = 6
IN_CAPTION  = 10
IN_CDATA_RCDATA  = 7
IN_CELL  = 14
IN_COLUMN_GROUP  = 11
IN_FOREIGN_CONTENT  = 17
IN_FRAMESET  = 19
IN_HEAD  = 3
IN_HEAD_NOSCRIPT  = 4
IN_ROW  = 13
IN_SELECT  = 15
IN_SELECT_IN_TABLE  = 16
IN_TABLE  = 8
IN_TABLE_BODY  = 12
IN_TABLE_TEXT  = 9
INITIAL  = 0
LIMITED_QUIRKS_MODE  = 202
MARKER  = 300
NO_QUIRKS  = 200
NS_HTML  = ull
NS_MATHML  = 'http://www.w3.org/1998/Math/MathML'
NS_SVG  = 'http://www.w3.org/2000/svg'
NS_XLINK  = 'http://www.w3.org/1999/xlink'
NS_XML  = 'http://www.w3.org/XML/1998/namespace'
NS_XMLNS  = 'http://www.w3.org/2000/xmlns/'
PHRASING  = 103
QUIRKS_MODE  = 201
SCOPE  = 0
SCOPE_LISTITEM  = 1
SCOPE_TABLE  = 2
SCOPING  = 101
SPECIAL  = 100
$content_model  : mixed
$stack  : mixed
$a_formatting  : mixed
$dom  : mixed
$flag_force_quirks  : mixed
$flag_frameset_ok  : mixed
$form_pointer  : mixed
$formatting  : mixed
$foster_parent  : mixed
$fragment  : mixed
$head_pointer  : mixed
$ignore_lf_token  : mixed
$ignored  : mixed
$mode  : mixed
$original_mode  : mixed
$pendingTableCharacters  : mixed
$pendingTableCharactersDirty  : mixed
$quirks_mode  : mixed
$root  : mixed
$scoping  : mixed
$secondary_mode  : mixed
$special  : mixed
__construct()  : mixed
HTML5_TreeBuilder constructor.
adjustForeignAttributes()  : mixed
adjustMathMLAttributes()  : mixed
adjustSVGAttributes()  : mixed
currentTableIsTainted()  : bool
emitToken()  : mixed
Process tag tokens
fosterParent()  : mixed
getQuirksMode()  : mixed
insertForeignElement()  : mixed
save()  : DOMDocument|DOMNodeList
setupContext()  : mixed
Sets up the tree constructor for building a fragment.
appendToRealParent()  : mixed
clearStackToTableContext()  : mixed
clearTheActiveFormattingElementsUpToTheLastMarker()  : mixed
closeCell()  : mixed
elementInScope()  : bool|null
generateImpliedEndTags()  : mixed
getAttr()  : bool
getCurrentTable()  : mixed
getElementCategory()  : int
getFosterParent()  : mixed
insertCDATAElement()  : mixed
insertComment()  : mixed
insertElement()  : mixed
insertRCDATAElement()  : mixed
insertText()  : mixed
printActiveFormattingElements()  : mixed
For debugging, prints active formatting elements
printStack()  : mixed
For debugging, prints the stack
processWithRulesFor()  : mixed
reconstructActiveFormattingElements()  : bool
resetInsertionMode()  : mixed
strConst()  : mixed
Converts a magic number to a readable name. Use for debugging.

Constants

AFTER_AFTER_BODY

public mixed AFTER_AFTER_BODY = 21

AFTER_AFTER_FRAMESET

public mixed AFTER_AFTER_FRAMESET = 22

IN_FOREIGN_CONTENT

public mixed IN_FOREIGN_CONTENT = 17

IN_SELECT_IN_TABLE

public mixed IN_SELECT_IN_TABLE = 16

LIMITED_QUIRKS_MODE

public mixed LIMITED_QUIRKS_MODE = 202

NS_MATHML

public mixed NS_MATHML = 'http://www.w3.org/1998/Math/MathML'

NS_SVG

public mixed NS_SVG = 'http://www.w3.org/2000/svg'
public mixed NS_XLINK = 'http://www.w3.org/1999/xlink'

NS_XML

public mixed NS_XML = 'http://www.w3.org/XML/1998/namespace'

NS_XMLNS

public mixed NS_XMLNS = 'http://www.w3.org/2000/xmlns/'

Properties

$flag_force_quirks

private mixed $flag_force_quirks = alse

$flag_frameset_ok

private mixed $flag_frameset_ok = rue

$formatting

private mixed $formatting = ['a', 'b', 'big', 'code', 'em', 'font', 'i', 'nobr', 's', 'small', 'strike', 'strong', 'tt', 'u']

$pendingTableCharacters

private mixed $pendingTableCharacters

$pendingTableCharactersDirty

private mixed $pendingTableCharactersDirty

$scoping

private mixed $scoping = ['applet', 'button', 'caption', 'html', 'marquee', 'object', 'table', 'td', 'th', 'svg:foreignObject']

$special

private mixed $special = ['address', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'center', 'col', 'colgroup', 'command', 'dc', 'dd', 'details', 'dir', 'div', 'dl', 'ds', 'dt', 'embed', 'fieldset', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'menu', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'select', 'spacer', 'style', 'tbody', 'textarea', 'tfoot', 'thead', 'title', 'tr', 'ul', 'wbr']

Methods

__construct()

HTML5_TreeBuilder constructor.

public __construct() : mixed
Return values
mixed

adjustForeignAttributes()

public adjustForeignAttributes( $token) : mixed
Parameters
$token :
Return values
mixed

adjustMathMLAttributes()

public adjustMathMLAttributes( $token) : mixed
Parameters
$token :
Return values
mixed

adjustSVGAttributes()

public adjustSVGAttributes( $token) : mixed
Parameters
$token :
Return values
mixed

currentTableIsTainted()

public currentTableIsTainted() : bool
Return values
bool

emitToken()

Process tag tokens

public emitToken( $token[, null $mode = null ]) : mixed
Parameters
$token :
$mode : null = null
Return values
mixed

fosterParent()

public fosterParent( $node) : mixed
Parameters
$node :
Return values
mixed

getQuirksMode()

public getQuirksMode() : mixed
Return values
mixed

insertForeignElement()

public insertForeignElement( $token,  $namespaceURI) : mixed
Parameters
$token :
$namespaceURI :
Return values
mixed

save()

public save() : DOMDocument|DOMNodeList
Return values
DOMDocument|DOMNodeList

setupContext()

Sets up the tree constructor for building a fragment.

public setupContext([null $context = null ]) : mixed
Parameters
$context : null = null
Return values
mixed

appendToRealParent()

private appendToRealParent( $node) : mixed
Parameters
$node :
Return values
mixed

clearStackToTableContext()

private clearStackToTableContext( $elements) : mixed
Parameters
$elements :
Return values
mixed

clearTheActiveFormattingElementsUpToTheLastMarker()

private clearTheActiveFormattingElementsUpToTheLastMarker() : mixed
Return values
mixed

closeCell()

private closeCell() : mixed
Return values
mixed

elementInScope()

private elementInScope( $el[, int $scope = self::SCOPE ]) : bool|null
Parameters
$el :
$scope : int = self::SCOPE
Return values
bool|null

generateImpliedEndTags()

private generateImpliedEndTags([array<string|int, mixed> $exclude = [] ]) : mixed
Parameters
$exclude : array<string|int, mixed> = []
Return values
mixed

getAttr()

private getAttr( $token,  $key) : bool
Parameters
$token :
$key :
Return values
bool

getCurrentTable()

private getCurrentTable() : mixed
Return values
mixed

getElementCategory()

private getElementCategory( $node) : int
Parameters
$node :
Return values
int

getFosterParent()

private getFosterParent() : mixed
Return values
mixed

insertCDATAElement()

private insertCDATAElement( $token) : mixed
Parameters
$token :
Return values
mixed

insertComment()

private insertComment( $data) : mixed
Parameters
$data :
Return values
mixed

insertElement()

private insertElement(mixed $token[, mixed $append = true ]) : mixed
Parameters
$token : mixed
$append : mixed = true
Return values
mixed

insertRCDATAElement()

private insertRCDATAElement( $token) : mixed
Parameters
$token :
Return values
mixed

insertText()

private insertText( $data) : mixed
Parameters
$data :
Return values
mixed

printActiveFormattingElements()

For debugging, prints active formatting elements

private printActiveFormattingElements() : mixed
Return values
mixed

printStack()

For debugging, prints the stack

private printStack() : mixed
Return values
mixed

processWithRulesFor()

private processWithRulesFor( $token,  $mode) : mixed
Parameters
$token :
$mode :
Return values
mixed

reconstructActiveFormattingElements()

private reconstructActiveFormattingElements() : bool
Return values
bool

resetInsertionMode()

private resetInsertionMode([null $context = null ]) : mixed
Parameters
$context : null = null
Return values
mixed

strConst()

Converts a magic number to a readable name. Use for debugging.

private strConst(mixed $number) : mixed
Parameters
$number : mixed
Return values
mixed

Search results