$names An array with the tag names in the
* keys, the value arbitrary
* @return bool
*/
abstract public function isOneOfSetInScope( $names );
/**
* Is there an element in list scope which is an HTML element with the
* given name?
*
* @param string $name
* @return bool
*/
abstract public function isInListScope( $name );
/**
* Is there an element in button scope which is an HTML element with the
* given name?
*
* @param string $name
* @return bool
*/
abstract public function isInButtonScope( $name );
/**
* Is there an element in table scope which is an HTML element with the
* given name?
*
* @param string $name
* @return bool
*/
abstract public function isInTableScope( $name );
/**
* Is there an element in select scope which is an HTML element with the
* given name?
*
* @param string $name
* @return bool
*/
abstract public function isInSelectScope( $name );
/**
* 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.
*
* @param int $idx
* @return Element|null
*/
abstract public function item( $idx );
/**
* Get the number of elements in the stack.
*
* @return integer
*/
abstract public function length();
/**
* Is there a template element in the stack of open elements?
*
* @return bool
*/
abstract public function hasTemplate();
/**
* Get a string representation of the stack for debugging purposes.
*
* @return string
*/
public function dump() {
$s = '';
for ( $i = 0; $i < $this->length(); $i++ ) {
$item = $this->item( $i );
$s .= "$i. " . $item->getDebugTag();
if ( $i === $this->length() - 1 && $item !== $this->current ) {
$s .= " CURRENT POINTER INCORRECT";
}
$s .= "\n";
}
return $s;
}
}