BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
PPNode_Hash_Tree Class Reference
Inheritance diagram for PPNode_Hash_Tree:
Collaboration diagram for PPNode_Hash_Tree:

Public Member Functions

 __construct (array $store, $index)
 
 __toString ()
 
 getChildren ()
 
 getFirstChild ()
 
 getNextSibling ()
 
 getChildrenOfType ($name)
 
 getRawChildren ()
 
 getLength ()
 
 item ($i)
 
 getName ()
 
 splitArg ()
 
 splitExt ()
 
 splitHeading ()
 
 splitTemplate ()
 

Static Public Member Functions

static factory (array $store, $index)
 
static splitRawArg (array $children)
 
static splitRawExt (array $children)
 
static splitRawHeading (array $children)
 
static splitRawTemplate (array $children)
 

Public Attributes

 $name
 
const NAME = 0
 
const CHILDREN = 1
 

Constructor & Destructor Documentation

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().

Parameters
array$store
int$index

Member Function Documentation

PPNode_Hash_Tree::__toString ( )

Convert a node to XML, for debugging

static PPNode_Hash_Tree::factory ( array  $store,
  $index 
)
static

Construct an appropriate PPNode_Hash_* object with a class that depends on what is at the relevant store index.

Parameters
array$store
int$index
Returns
PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text
PPNode_Hash_Tree::getChildren ( )
Returns
PPNode_Hash_Array

Implements PPNode.

PPNode_Hash_Tree::getChildrenOfType (   $name)

Get an array of the children with a given node name

Parameters
string$name
Returns
PPNode_Hash_Array

Implements PPNode.

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.

Returns
PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool

Implements PPNode.

PPNode_Hash_Tree::getLength ( )
Returns
bool

Implements PPNode.

PPNode_Hash_Tree::getName ( )
Returns
string

Implements PPNode.

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.

Returns
PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool

Implements PPNode.

PPNode_Hash_Tree::getRawChildren ( )

Get the raw child array. For internal use.

Returns
array
PPNode_Hash_Tree::item (   $i)
Parameters
int$i
Returns
bool

Implements PPNode.

PPNode_Hash_Tree::splitArg ( )

Split a "<part>" node into an associative array containing:

Exceptions
MWException
Returns
array

Implements PPNode.

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.

Exceptions
MWException
Returns
array

Implements PPNode.

PPNode_Hash_Tree::splitHeading ( )

Split an "<h>" node

Exceptions
MWException
Returns
array

Implements PPNode.

static PPNode_Hash_Tree::splitRawArg ( array  $children)
static

Like splitArg() but for a raw child array. For internal use only.

Parameters
array$children
Returns
array
static PPNode_Hash_Tree::splitRawExt ( array  $children)
static

Like splitExt() but for a raw child array. For internal use only.

Parameters
array$children
Returns
array
static PPNode_Hash_Tree::splitRawHeading ( array  $children)
static

Like splitHeading() but for a raw child array. For internal use only.

Parameters
array$children
Returns
array
static PPNode_Hash_Tree::splitRawTemplate ( array  $children)
static

Like splitTemplate() but for a raw child array. For internal use only.

Parameters
array$children
Returns
array
PPNode_Hash_Tree::splitTemplate ( )

Split a "<template>" or "<tplarg>" node

Exceptions
MWException
Returns
array

Member Data Documentation

const PPNode_Hash_Tree::CHILDREN = 1

The offset of the child list within descriptors, used in some places for readability.

const PPNode_Hash_Tree::NAME = 0

The offset of the name within descriptors, used in some places for readability.


The documentation for this class was generated from the following file: