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
AFTER_BODY
public
mixed
AFTER_BODY
= 18
AFTER_FRAMESET
public
mixed
AFTER_FRAMESET
= 20
AFTER_HEAD
public
mixed
AFTER_HEAD
= 5
BEFORE_HEAD
public
mixed
BEFORE_HEAD
= 2
BEFORE_HTML
public
mixed
BEFORE_HTML
= 1
FORMATTING
public
mixed
FORMATTING
= 102
IN_BODY
public
mixed
IN_BODY
= 6
IN_CAPTION
public
mixed
IN_CAPTION
= 10
IN_CDATA_RCDATA
public
mixed
IN_CDATA_RCDATA
= 7
IN_CELL
public
mixed
IN_CELL
= 14
IN_COLUMN_GROUP
public
mixed
IN_COLUMN_GROUP
= 11
IN_FOREIGN_CONTENT
public
mixed
IN_FOREIGN_CONTENT
= 17
IN_FRAMESET
public
mixed
IN_FRAMESET
= 19
IN_HEAD
public
mixed
IN_HEAD
= 3
IN_HEAD_NOSCRIPT
public
mixed
IN_HEAD_NOSCRIPT
= 4
IN_ROW
public
mixed
IN_ROW
= 13
IN_SELECT
public
mixed
IN_SELECT
= 15
IN_SELECT_IN_TABLE
public
mixed
IN_SELECT_IN_TABLE
= 16
IN_TABLE
public
mixed
IN_TABLE
= 8
IN_TABLE_BODY
public
mixed
IN_TABLE_BODY
= 12
IN_TABLE_TEXT
public
mixed
IN_TABLE_TEXT
= 9
INITIAL
public
mixed
INITIAL
= 0
LIMITED_QUIRKS_MODE
public
mixed
LIMITED_QUIRKS_MODE
= 202
MARKER
public
mixed
MARKER
= 300
NO_QUIRKS
public
mixed
NO_QUIRKS
= 200
NS_HTML
public
mixed
NS_HTML
=
ull
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'
NS_XLINK
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/'
PHRASING
public
mixed
PHRASING
= 103
QUIRKS_MODE
public
mixed
QUIRKS_MODE
= 201
SCOPE
public
mixed
SCOPE
= 0
SCOPE_LISTITEM
public
mixed
SCOPE_LISTITEM
= 1
SCOPE_TABLE
public
mixed
SCOPE_TABLE
= 2
SCOPING
public
mixed
SCOPING
= 101
SPECIAL
public
mixed
SPECIAL
= 100
Properties
$content_model
public
mixed
$content_model
$stack
public
mixed
$stack
= []
$a_formatting
private
mixed
$a_formatting
= []
$dom
private
mixed
$dom
$flag_force_quirks
private
mixed
$flag_force_quirks
= alse
$flag_frameset_ok
private
mixed
$flag_frameset_ok
= rue
$form_pointer
private
mixed
$form_pointer
=
ull
$formatting
private
mixed
$formatting
= ['a', 'b', 'big', 'code', 'em', 'font', 'i', 'nobr', 's', 'small', 'strike', 'strong', 'tt', 'u']
$foster_parent
private
mixed
$foster_parent
= alse
$fragment
private
mixed
$fragment
= alse
$head_pointer
private
mixed
$head_pointer
=
ull
$ignore_lf_token
private
mixed
$ignore_lf_token
= 0
$ignored
private
mixed
$ignored
= alse
$mode
private
mixed
$mode
$original_mode
private
mixed
$original_mode
$pendingTableCharacters
private
mixed
$pendingTableCharacters
$pendingTableCharactersDirty
private
mixed
$pendingTableCharactersDirty
$quirks_mode
private
mixed
$quirks_mode
=
ull
$root
private
mixed
$root
$scoping
private
mixed
$scoping
= ['applet', 'button', 'caption', 'html', 'marquee', 'object', 'table', 'td', 'th', 'svg:foreignObject']
$secondary_mode
private
mixed
$secondary_mode
$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
Return values
mixed —adjustMathMLAttributes()
public
adjustMathMLAttributes( $token) : mixed
Parameters
Return values
mixed —adjustSVGAttributes()
public
adjustSVGAttributes( $token) : mixed
Parameters
Return values
mixed —currentTableIsTainted()
public
currentTableIsTainted() : bool
Return values
bool —emitToken()
Process tag tokens
public
emitToken( $token[, null $mode = null ]) : mixed
Parameters
Return values
mixed —fosterParent()
public
fosterParent( $node) : mixed
Parameters
Return values
mixed —getQuirksMode()
public
getQuirksMode() : mixed
Return values
mixed —insertForeignElement()
public
insertForeignElement( $token, $namespaceURI) : mixed
Parameters
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
Return values
mixed —clearStackToTableContext()
private
clearStackToTableContext( $elements) : mixed
Parameters
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
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
Return values
bool —getCurrentTable()
private
getCurrentTable() : mixed
Return values
mixed —getElementCategory()
private
getElementCategory( $node) : int
Parameters
Return values
int —getFosterParent()
private
getFosterParent() : mixed
Return values
mixed —insertCDATAElement()
private
insertCDATAElement( $token) : mixed
Parameters
Return values
mixed —insertComment()
private
insertComment( $data) : mixed
Parameters
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
Return values
mixed —insertText()
private
insertText( $data) : mixed
Parameters
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
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