RemexHtml
Fast HTML 5 parser
|
Storage for all the state that TreeBuilder needs to associate with each element. More...
Public Member Functions | |
__construct ( $namespace, $name, Attributes $attrs) | |
Constructor. | |
bool | isMathmlTextIntegration () |
Is the element a MathML text integration point? | |
bool | isHtmlIntegration () |
Is the element an HTML integration point? | |
string | getNoahKey () |
Get a string key for the Noah's Ark algorithm. | |
string | getDebugTag () |
Get a string identifying the element, for use in debugging. | |
Public Attributes | |
string | $namespace |
The namespace. | |
string | $name |
The tag name, usually exactly as it appeared in the source document. | |
string | $htmlName |
This is an internal designation of the type of the element, which is equal to the tag name when the element is in the HTML namespace, and is some other string when the element is not in the HTML namespace. | |
Attributes | $attrs |
bool | $isVirtual |
This is true if the element was created by the TreeBuilder either as a fragment context node, or as a synthetic <html> element to be used as the top-level element in fragment parsing. | |
$nextEltInScope | |
Internal to CachingStack. | |
$stackIndex | |
Internal to CachingStack and SimpleStack. | |
$prevAFE | |
Internal to ActiveFormattingElements. | |
$nextAFE | |
Internal to ActiveFormattingElements. | |
$nextNoah | |
Internal to ActiveFormattingElements. | |
$userData | |
This member variable can be written to by the TreeHandler, to store any state associated with the element (such as a DOM node). | |
int | $uid |
A unique ID which identifies the element. | |
Storage for all the state that TreeBuilder needs to associate with each element.
These objects should be freed once they fall out of TreeBuilder's data structures (the stack etc.).
These objects are also used to communicate information about elements with downstream clients.
Wikimedia\RemexHtml\TreeBuilder\Element::__construct | ( | $namespace, | |
$name, | |||
Attributes | $attrs ) |
Constructor.
string | $namespace | |
string | $name | |
Attributes | $attrs |
string Wikimedia\RemexHtml\TreeBuilder\Element::getDebugTag | ( | ) |
Get a string identifying the element, for use in debugging.
string Wikimedia\RemexHtml\TreeBuilder\Element::getNoahKey | ( | ) |
Get a string key for the Noah's Ark algorithm.
bool Wikimedia\RemexHtml\TreeBuilder\Element::isHtmlIntegration | ( | ) |
Is the element an HTML integration point?
bool Wikimedia\RemexHtml\TreeBuilder\Element::isMathmlTextIntegration | ( | ) |
Is the element a MathML text integration point?
string Wikimedia\RemexHtml\TreeBuilder\Element::$name |
The tag name, usually exactly as it appeared in the source document.
This is not strictly a local name, since it still contains a colon for prefixed elements. In foreign content, it is effectively a local name. It is suitable for use as a serialized tag name.
string Wikimedia\RemexHtml\TreeBuilder\Element::$namespace |
The namespace.
This will be the HTML namespace for elements that are not in foreign content, even if there is a prefix.
Wikimedia\RemexHtml\TreeBuilder\Element::$nextEltInScope |
Internal to CachingStack.
A link in the scope list.
Wikimedia\RemexHtml\TreeBuilder\Element::$stackIndex |
Internal to CachingStack and SimpleStack.
The current stack index, or null if the element is not in the stack.
Wikimedia\RemexHtml\TreeBuilder\Element::$userData |
This member variable can be written to by the TreeHandler, to store any state associated with the element (such as a DOM node).
It is not used by TreeBuilder.