RemexHtml
Fast HTML 5 parser
|
The parent class for the "stack of open elements". More...
Public Member Functions | |
push (Element $elt) | |
Push an element. | |
Element null | pop () |
Pop an element from the stack. | |
replace (Element $old, Element $new) | |
Replace an element which is on the stack with another element of the same type (i.e. | |
remove (Element $elt) | |
Remove an element, potentially from the middle of the stack. | |
bool | isInScope ( $name) |
Is there an element in (default) scope which is in the HTML namespace and has the given tag name? | |
bool | isElementInScope (Element $elt) |
Is the given element in (default) scope? | |
bool | isOneOfSetInScope ( $names) |
Is there any element in the (default) scope which is in the HTML namespace and has one of the given tag names? | |
bool | isInListScope ( $name) |
Is there an element in list scope which is an HTML element with the given name? | |
bool | isInButtonScope ( $name) |
Is there an element in button scope which is an HTML element with the given name? | |
bool | isInTableScope ( $name) |
Is there an element in table scope which is an HTML element with the given name? | |
bool | isInSelectScope ( $name) |
Is there an element in select scope which is an HTML element with the given name? | |
Element null | item ( $idx) |
Get an element from the stack, where 0 is the first element inserted, and $this->length() - 1 is the most recently inserted element. | |
int | length () |
Get the number of elements in the stack. | |
bool | hasTemplate () |
Is there a template element in the stack of open elements? | |
string | dump () |
Get a string representation of the stack for debugging purposes. | |
Public Attributes | |
$current | |
The parent class for the "stack of open elements".
string Wikimedia\RemexHtml\TreeBuilder\Stack::dump | ( | ) |
Get a string representation of the stack for debugging purposes.
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack.
|
abstract |
Is there a template element in the stack of open elements?
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Is the given element in (default) scope?
Element | $elt |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Is there an element in button scope which is an HTML element with the given name?
string | $name |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Is there an element in list scope which is an HTML element with the given name?
string | $name |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Is there an element in (default) scope which is in the HTML namespace and has the given tag name?
string | $name |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Is there an element in select scope which is an HTML element with the given name?
string | $name |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Is there an element in table scope which is an HTML element with the given name?
string | $name |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Is there any element in the (default) scope which is in the HTML namespace and has one of the given tag names?
array<string,mixed> | $names An array with the tag names in the keys, the value arbitrary |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Get an element from the stack, where 0 is the first element inserted, and $this->length() - 1 is the most recently inserted element.
This will raise a PHP notice if the index is out of range.
int | $idx |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Get the number of elements in the stack.
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Pop an element from the stack.
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Push an element.
Element | $elt |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
|
abstract |
Remove an element, potentially from the middle of the stack.
Element | $elt |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.
Replace an element which is on the stack with another element of the same type (i.e.
with the same tag name).
Element | $old | The element to be removed |
Element | $new | The element to be inserted |
Reimplemented in Wikimedia\RemexHtml\TreeBuilder\CachingStack, and Wikimedia\RemexHtml\TreeBuilder\SimpleStack.