43 $this->value = $store[$index];
44 if ( !is_scalar( $this->value ) ) {
45 throw new MWException( __CLASS__ .
' given object instead of string' );
47 $this->store = $store;
48 $this->index = $index;
52 return htmlspecialchars( $this->value, ENT_COMPAT );
75 public function item( $i ) {
85 throw new LogicException( __METHOD__ .
': not supported' );
90 throw new LogicException( __METHOD__ .
': not supported' );
95 throw new LogicException( __METHOD__ .
': not supported' );
getChildren()
Get an array-type node containing the children of this node.
getChildrenOfType( $name)
Get all children of this tree node which have a given name.
__construct(array $store, $index)
Construct an object using the data from $store[$index].
getLength()
Returns the length of the array, or false if this is not an array-type node.
splitHeading()
Split an "<h>" node.
getFirstChild()
Get the first child of a tree node.
getNextSibling()
Get the next sibling of any node.
splitArg()
Split a "<part>" node into an associative array containing: name PPNode name index String index value...
getName()
Get the name of this node.
item( $i)
Returns an item of an array-type node.
splitExt()
Split an "<ext>" node into an associative array containing name, attr, inner and close All values in ...
static factory(array $store, $index)
Construct an appropriate PPNode_Hash_* object with a class that depends on what is at the relevant st...
There are three types of nodes: