MediaWiki  1.34.0
PPNode_DOM Class Reference
Inheritance diagram for PPNode_DOM:
Collaboration diagram for PPNode_DOM:

Public Member Functions

 __construct ( $node, $xpath=false)
 
 __toString ()
 
 getChildren ()
 
 getChildrenOfType ( $type)
 
 getFirstChild ()
 
 getLength ()
 
 getName ()
 
 getNextSibling ()
 
 getXPath ()
 
 item ( $i)
 
 splitArg ()
 Split a "<part>" node into an associative array containing: More...
 
 splitExt ()
 Split an "<ext>" node into an associative array containing name, attr, inner and close All values in the resulting array are PPNodes. More...
 
 splitHeading ()
 Split a "<h>" node. More...
 

Public Attributes

DOMElement DOMNodeList $node
 
 $xpath
 

Detailed Description

Deprecated:
since 1.34, use PPNode_Hash_{Tree,Text,Array,Attr}

-file-suppress PhanUndeclaredMethod

Definition at line 28 of file PPNode_DOM.php.

Constructor & Destructor Documentation

◆ __construct()

PPNode_DOM::__construct (   $node,
  $xpath = false 
)

Definition at line 36 of file PPNode_DOM.php.

References $node.

Member Function Documentation

◆ __toString()

PPNode_DOM::__toString ( )

Definition at line 50 of file PPNode_DOM.php.

References $node, and $s.

◆ getChildren()

PPNode_DOM::getChildren ( )
Returns
false|PPNode_DOM

Implements PPNode.

Definition at line 65 of file PPNode_DOM.php.

Referenced by splitHeading().

◆ getChildrenOfType()

PPNode_DOM::getChildrenOfType (   $type)
Parameters
string$type
Returns
false|PPNode_DOM

Implements PPNode.

Definition at line 88 of file PPNode_DOM.php.

References $type, and getXPath().

◆ getFirstChild()

PPNode_DOM::getFirstChild ( )
Returns
false|PPNode_DOM

Implements PPNode.

Definition at line 72 of file PPNode_DOM.php.

◆ getLength()

PPNode_DOM::getLength ( )
Returns
int

Implements PPNode.

Definition at line 95 of file PPNode_DOM.php.

◆ getName()

PPNode_DOM::getName ( )
Returns
string

Implements PPNode.

Definition at line 115 of file PPNode_DOM.php.

Referenced by splitHeading().

◆ getNextSibling()

PPNode_DOM::getNextSibling ( )
Returns
false|PPNode_DOM

Implements PPNode.

Definition at line 79 of file PPNode_DOM.php.

◆ getXPath()

PPNode_DOM::getXPath ( )
Returns
DOMXPath

Definition at line 43 of file PPNode_DOM.php.

References $xpath.

Referenced by getChildrenOfType(), splitArg(), and splitExt().

◆ item()

PPNode_DOM::item (   $i)
Parameters
int$i
Returns
bool|PPNode_DOM

Implements PPNode.

Definition at line 107 of file PPNode_DOM.php.

◆ splitArg()

PPNode_DOM::splitArg ( )

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

Exceptions
MWException
Returns
array

Implements PPNode.

Definition at line 132 of file PPNode_DOM.php.

References $xpath, and getXPath().

◆ splitExt()

PPNode_DOM::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.

Definition at line 154 of file PPNode_DOM.php.

References $xpath, and getXPath().

◆ splitHeading()

PPNode_DOM::splitHeading ( )

Split a "<h>" node.

Exceptions
MWException
Returns
array

Implements PPNode.

Definition at line 180 of file PPNode_DOM.php.

References getChildren(), and getName().

Member Data Documentation

◆ $node

DOMElement DOMNodeList PPNode_DOM::$node

Definition at line 33 of file PPNode_DOM.php.

Referenced by __construct(), and __toString().

◆ $xpath

PPNode_DOM::$xpath

Definition at line 34 of file PPNode_DOM.php.

Referenced by getXPath(), splitArg(), and splitExt().


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