MediaWiki REL1_39
|
Public Member Functions | |
__construct (array $store, $index) | |
Construct an object using the data from $store[$index]. | |
__toString () | |
Convert a node to XML, for debugging. | |
getChildren () | |
getChildrenOfType ( $name) | |
Get an array of the children with a given node name. | |
getFirstChild () | |
Get the first child, or false if there is none. | |
getLength () | |
getName () | |
getNextSibling () | |
Get the next sibling, or false if there is none. | |
getRawChildren () | |
Get the raw child array. | |
item ( $i) | |
splitArg () | |
Split a "<part>" node into an associative array containing: | |
splitExt () | |
Split an "<ext>" node into an associative array containing name, attr, inner and close All values in the resulting array are PPNodes. | |
splitHeading () | |
Split an "<h>" node. | |
splitTemplate () | |
Split a "<template>" or "<tplarg>" node. | |
Static Public Member Functions | |
static | factory (array $store, $index) |
Construct an appropriate PPNode_Hash_* object with a class that depends on what is at the relevant store index. | |
static | splitRawArg (array $children) |
Like splitArg() but for a raw child array. | |
static | splitRawExt (array $children) |
Like splitExt() but for a raw child array. | |
static | splitRawHeading (array $children) |
Like splitHeading() but for a raw child array. | |
static | splitRawTemplate (array $children) |
Like splitTemplate() but for a raw child array. | |
Public Attributes | |
string | $name |
const | CHILDREN = 1 |
The offset of the child list within descriptors, used in some places for readability. | |
const | NAME = 0 |
The offset of the name within descriptors, used in some places for readability. | |
Definition at line 26 of file PPNode_Hash_Tree.php.
PPNode_Hash_Tree::__construct | ( | array | $store, |
$index ) |
Construct an object using the data from $store[$index].
The rest of the store array can be accessed via getNextSibling().
array | $store | |
int | $index |
Definition at line 70 of file PPNode_Hash_Tree.php.
PPNode_Hash_Tree::__toString | ( | ) |
Convert a node to XML, for debugging.
Definition at line 109 of file PPNode_Hash_Tree.php.
References getFirstChild().
|
static |
Construct an appropriate PPNode_Hash_* object with a class that depends on what is at the relevant store index.
array | $store | |
int | $index |
MWException |
Definition at line 85 of file PPNode_Hash_Tree.php.
Referenced by getChildren(), getChildrenOfType(), getFirstChild(), PPNode_Hash_Attr\getNextSibling(), PPNode_Hash_Text\getNextSibling(), and getNextSibling().
PPNode_Hash_Tree::getChildren | ( | ) |
Implements PPNode.
Definition at line 130 of file PPNode_Hash_Tree.php.
References factory().
PPNode_Hash_Tree::getChildrenOfType | ( | $name | ) |
Get an array of the children with a given node name.
string | $name |
Implements PPNode.
Definition at line 170 of file PPNode_Hash_Tree.php.
PPNode_Hash_Tree::getFirstChild | ( | ) |
Get the first child, or false if there is none.
Note that this will return a temporary proxy object: different instances will be returned if this is called more than once on the same node.
Implements PPNode.
Definition at line 145 of file PPNode_Hash_Tree.php.
References factory().
Referenced by __toString().
PPNode_Hash_Tree::getLength | ( | ) |
PPNode_Hash_Tree::getName | ( | ) |
Implements PPNode.
Definition at line 206 of file PPNode_Hash_Tree.php.
References $name.
PPNode_Hash_Tree::getNextSibling | ( | ) |
Get the next sibling, or false if there is none.
Note that this will return a temporary proxy object: different instances will be returned if this is called more than once on the same node.
Implements PPNode.
Definition at line 160 of file PPNode_Hash_Tree.php.
References factory().
PPNode_Hash_Tree::getRawChildren | ( | ) |
Get the raw child array.
For internal use.
Definition at line 184 of file PPNode_Hash_Tree.php.
PPNode_Hash_Tree::item | ( | $i | ) |
int | $i |
Implements PPNode.
Definition at line 199 of file PPNode_Hash_Tree.php.
PPNode_Hash_Tree::splitArg | ( | ) |
Split a "<part>" node into an associative array containing:
MWException |
Implements PPNode.
Definition at line 219 of file PPNode_Hash_Tree.php.
References splitRawArg().
PPNode_Hash_Tree::splitExt | ( | ) |
Split an "<ext>" node into an associative array containing name, attr, inner and close All values in the resulting array are PPNodes.
Inner and close are optional.
MWException |
Implements PPNode.
Definition at line 262 of file PPNode_Hash_Tree.php.
References splitRawExt().
PPNode_Hash_Tree::splitHeading | ( | ) |
Split an "<h>" node.
MWException |
Implements PPNode.
Definition at line 304 of file PPNode_Hash_Tree.php.
References splitRawHeading().
|
static |
Like splitArg() but for a raw child array.
For internal use only.
array | $children |
Definition at line 228 of file PPNode_Hash_Tree.php.
References CHILDREN, and NAME.
Referenced by splitArg().
|
static |
Like splitExt() but for a raw child array.
For internal use only.
array | $children |
Definition at line 271 of file PPNode_Hash_Tree.php.
Referenced by PPFrame_Hash\expand(), and splitExt().
|
static |
Like splitHeading() but for a raw child array.
For internal use only.
array | $children |
Definition at line 316 of file PPNode_Hash_Tree.php.
References CHILDREN.
Referenced by PPFrame_Hash\expand(), and splitHeading().
|
static |
Like splitTemplate() but for a raw child array.
For internal use only.
array | $children |
Definition at line 350 of file PPNode_Hash_Tree.php.
Referenced by PPFrame_Hash\expand(), and splitTemplate().
PPNode_Hash_Tree::splitTemplate | ( | ) |
Split a "<template>" or "<tplarg>" node.
MWException |
Definition at line 340 of file PPNode_Hash_Tree.php.
References splitRawTemplate().
string PPNode_Hash_Tree::$name |
Definition at line 29 of file PPNode_Hash_Tree.php.
Referenced by getChildrenOfType(), and getName().
const PPNode_Hash_Tree::CHILDREN = 1 |
The offset of the child list within descriptors, used in some places for readability.
Definition at line 61 of file PPNode_Hash_Tree.php.
Referenced by PPNode_Hash_Attr\__construct(), splitRawArg(), and splitRawHeading().
const PPNode_Hash_Tree::NAME = 0 |
The offset of the name within descriptors, used in some places for readability.
Definition at line 55 of file PPNode_Hash_Tree.php.
Referenced by PPNode_Hash_Attr\__construct(), and splitRawArg().