45 $descriptor = $store[$index];
47 throw new InvalidArgumentException( __METHOD__ .
': invalid name in attribute descriptor' );
51 $this->store = $store;
52 $this->index = $index;
56 return "<@{$this->name}>" . htmlspecialchars( $this->value, ENT_COMPAT ) .
"</@{$this->name}>";
83 public function item( $i ) {
89 throw new LogicException( __METHOD__ .
': not supported' );
94 throw new LogicException( __METHOD__ .
': not supported' );
99 throw new LogicException( __METHOD__ .
': not supported' );
getChildren()
Get an array-type node containing the children of this node.
splitExt()
Split an "<ext>" node into an associative array containing name, attr, inner and close All values in ...
splitArg()
Split a "<part>" node into an associative array containing: name PPNode name index String index value...
__construct(array $store, $index)
Construct an object using the data from $store[$index].
item( $i)
Returns an item of an array-type node.
getChildrenOfType( $name)
Get all children of this tree node which have a given name.
splitHeading()
Split an "<h>" node.
getName()
Get the name of this node.
getLength()
Returns the length of the array, or false if this is not an array-type node.
getFirstChild()
Get the first child of a tree node.
getNextSibling()
Get the next sibling of any node.
static factory(array $store, $index)
Construct an appropriate PPNode_Hash_* object with a class that depends on what is at the relevant st...
const CHILDREN
The offset of the child list within descriptors, used in some places for readability.
const NAME
The offset of the name within descriptors, used in some places for readability.
There are three types of nodes: