fititnt - Especialista e Desenvolvedor Joomla! Visit fititnt.org, and look for some extension or more Joomla Framework info domit-xmlparser
domit-xmlparser-main
[ class tree: domit-xmlparser ] [ index: domit-xmlparser ] [ all elements ]

Class: DOMIT_XPath

Source Location: /libraries/domit/xml_domit_xpath.php

Class DOMIT_XPath

Property Summary
array   $arPathSegments  
Object   $callingNode  
string   $charContainer  
string   $currChar  
string   $currentSegment  
array   $globalNodeContainer  
array   $localNodeContainer  
Object   $nodeList  
array   $normalizationTable  
array   $normalizationTable2  
array   $normalizationTable3  
Object   $searchType  

[ Top ]
Method Summary
DOMIT_XPath   DOMIT_XPath()   Constructor - creates an empty DOMIT_NodeList to store matching nodes
string   expressionToPHP()   Converts the predicate expression into a PHP expression
void   filterByChildName()   Selects named elements with the specified named child
void   filterByIndex()   Selects named elements of the specified index
void   filterByPHPExpression()   Selects nodes that match the predicate expression
boolean   hasNamedChildElement()   Selects nodes with child elements that match the specified name
boolean   hasNamedChildElementEqualToValue()   Selects nodes with child elements that match the specified name and text value
boolean   hasNamedChildElementGreaterThanOrEqualToValue()   Selects nodes with child elements that are greater than or equal to the specified name and value
boolean   hasNamedChildElementGreaterThanValue()   Selects nodes with child elements that are greater than the specified name and value
boolean   hasNamedChildElementLessThanOrEqualToValue()   Selects nodes with child elements that are less than or equal to the specified name and value
boolean   hasNamedChildElementLessThanValue()   Selects nodes with child elements that are less than the specified name and value
boolean   hasNamedChildElementNotEqualToValue()   Selects nodes with child elements that are not equal to the specified name and value
int   initSearch()   Initializes the contextNode and searchType
string   normalize()   Converts long XPath syntax into abbreviated XPath syntax
Object   &parsePattern()   Parses the supplied "path"-based pattern
void   parsePredicate()   Parses a predicate expression [...]
string   predicateToPHP()   Converts the predicate into PHP evaluable code
void   processPatternSegment()   Generates a new globalNodeContainer of matches
void   refilterByIndex()   Selects named elements of the specified index
void   selectAttribute()   Selects named attributes of the current context nodes
void   selectNamedChild()   Selects all child nodes of the current context nodes
void   selectNodesByFunction()   Selects any nodes of the current context nodes which match the given function
void   selectParent()   Selects parent node of the current context nodes
void   splitPattern()   Splits the supplied pattern into searchable segments
void   updateNodeContainers()   Replaces the global node container with the local node container
void   _filterByChildName()   Selects named elements with the specified named child
void   _filterByIndex()   Selects named elements of the specified index
void   _selectAttribute()   Selects all attributes of the context nodes
void   _selectNamedChild()   Selects all child nodes of the context node
void   _selectParent()   Selects parent node of the current context nodes

[ Top ]
Properties
array   $arPathSegments = array() [line 40]

[ Top ]
Object   $callingNode [line 36]

[ Top ]
string   $charContainer [line 44]

[ Top ]
string   $currChar [line 46]

[ Top ]
string   $currentSegment [line 48]

[ Top ]
array   $globalNodeContainer [line 50]

[ Top ]
array   $localNodeContainer [line 52]

[ Top ]
Object   $nodeList [line 42]

[ Top ]
array   $normalizationTable = array('child::' => '', 'self::' => '.',
'attribute::' => '@', 'descendant::' => '*//',
"\t" => ' ', "\x0B" => ' ')
[line 54]

[ Top ]
array   $normalizationTable2 = array(' =' => '=', '= ' => '=', ' <' => '<',
' >' => '>', '< ' => '<', '> ' => '>',
' !' => '!', '( ' => '(',
' )' => ')', ' ]' => ']', '] ' => ']',
' [' => '[', '[ ' => '[', ' /' => '/',
'/ ' => '/', '"' => "'")
[line 58]

[ Top ]
array   $normalizationTable3 = array('position()=' => '',
'/descendant-or-self::node()/' => "//", 'self::node()' => '.',
'parent::node()' => '..')
[line 65]

[ Top ]
Object   $searchType [line 38]

[ Top ]
Methods
Constructor DOMIT_XPath  [line 72]

  DOMIT_XPath DOMIT_XPath( )

Constructor - creates an empty DOMIT_NodeList to store matching nodes



[ Top ]
expressionToPHP  [line 312]

  string expressionToPHP( string $expression  )

Converts the predicate expression into a PHP expression

Parameters:
string   $expression:  The predicate expression

API Tags:
Return:  The converted PHP expression


[ Top ]
filterByChildName  [line 728]

  void filterByChildName( string $nodeName, string $childName, boolean $deep  )

Selects named elements with the specified named child

Parameters:
string   $nodeName:  The pattern segment containing the node expression
string   $childName:  The tag name of the matching child
boolean   $deep:  True if the selection is to be performed recursively


[ Top ]
filterByIndex  [line 682]

  void filterByIndex( string $nodeName, int $index, boolean $deep  )

Selects named elements of the specified index

Parameters:
string   $nodeName:  The pattern segment containing the node expression
int   $index:  The index (base 1) of the matching node
boolean   $deep:  True if the selection is to be performed recursively


[ Top ]
filterByPHPExpression  [line 433]

  void filterByPHPExpression( string $expression  )

Selects nodes that match the predicate expression

Parameters:
string   $expression:  The predicate expression, formatted as a PHP expression


[ Top ]
hasNamedChildElement  [line 453]

  boolean hasNamedChildElement( object The &$parentNode, string $nodeName  )

Selects nodes with child elements that match the specified name

Parameters:
object The   &$parentNode:  parent node of the child elements to match
string   $nodeName:  The tag name to match on

API Tags:
Return:  True if a matching child element exists


[ Top ]
hasNamedChildElementEqualToValue  [line 474]

  boolean hasNamedChildElementEqualToValue( object The &$parentNode, string $nodeName, string $nodeValue  )

Selects nodes with child elements that match the specified name and text value

Parameters:
object The   &$parentNode:  parent node of the child elements to match
string   $nodeName:  The tag name to match on
string   $nodeValue:  The text string to match on

API Tags:
Return:  True if a matching child element exists


[ Top ]
hasNamedChildElementGreaterThanOrEqualToValue  [line 496]

  boolean hasNamedChildElementGreaterThanOrEqualToValue( object The &$parentNode, string $nodeName, string $nodeValue  )

Selects nodes with child elements that are greater than or equal to the specified name and value

Parameters:
object The   &$parentNode:  parent node of the child elements to match
string   $nodeName:  The tag name to match on
string   $nodeValue:  The text string to match on

API Tags:
Return:  True if a matching child element exists


[ Top ]
hasNamedChildElementGreaterThanValue  [line 587]

  boolean hasNamedChildElementGreaterThanValue( object The &$parentNode, string $nodeName, string $nodeValue  )

Selects nodes with child elements that are greater than the specified name and value

Parameters:
object The   &$parentNode:  parent node of the child elements to match
string   $nodeName:  The tag name to match on
string   $nodeValue:  The text string to match on

API Tags:
Return:  True if a matching child element exists


[ Top ]
hasNamedChildElementLessThanOrEqualToValue  [line 527]

  boolean hasNamedChildElementLessThanOrEqualToValue( object The &$parentNode, string $nodeName, string $nodeValue  )

Selects nodes with child elements that are less than or equal to the specified name and value

Parameters:
object The   &$parentNode:  parent node of the child elements to match
string   $nodeName:  The tag name to match on
string   $nodeValue:  The text string to match on

API Tags:
Return:  True if a matching child element exists


[ Top ]
hasNamedChildElementLessThanValue  [line 618]

  boolean hasNamedChildElementLessThanValue( object The &$parentNode, string $nodeName, string $nodeValue  )

Selects nodes with child elements that are less than the specified name and value

Parameters:
object The   &$parentNode:  parent node of the child elements to match
string   $nodeName:  The tag name to match on
string   $nodeValue:  The text string to match on

API Tags:
Return:  True if a matching child element exists


[ Top ]
hasNamedChildElementNotEqualToValue  [line 557]

  boolean hasNamedChildElementNotEqualToValue( object The &$parentNode, string $nodeName, string $nodeValue  )

Selects nodes with child elements that are not equal to the specified name and value

Parameters:
object The   &$parentNode:  parent node of the child elements to match
string   $nodeName:  The tag name to match on
string   $nodeValue:  The text string to match on

API Tags:
Return:  True if a matching child element exists


[ Top ]
initSearch  [line 1020]

  int initSearch( array &$currArPathSegments  )

Initializes the contextNode and searchType

Parameters:
array   &$currArPathSegments:  The current array of path segments

API Tags:
Return:  The index of the first array item to begin the search at


[ Top ]
normalize  [line 1002]

  string normalize( string $pattern  )

Converts long XPath syntax into abbreviated XPath syntax

Parameters:
string   $pattern:  The pattern

API Tags:
Return:  The normalized pattern


[ Top ]
parsePattern  [line 83]

  Object &parsePattern( Object &$node, string $pattern, [ $nodeIndex = 0]  )

Parses the supplied "path"-based pattern

Parameters:
Object   &$node:  The node from which the search is called
string   $pattern:  The pattern
   $nodeIndex: 

API Tags:
Return:  The NodeList containing matching nodes


[ Top ]
parsePredicate  [line 230]

  void parsePredicate( string $nodeName, string $patternSegment  )

Parses a predicate expression [...]

Parameters:
string   $nodeName:  The pattern segment containing the node expression
string   $patternSegment:  The pattern segment containing the predicate expression


[ Top ]
predicateToPHP  [line 272]

  string predicateToPHP( string $predicate  )

Converts the predicate into PHP evaluable code

Parameters:
string   $predicate:  The predicate

API Tags:
Return:  The converted PHP expression


[ Top ]
processPatternSegment  [line 154]

  void processPatternSegment( )

Generates a new globalNodeContainer of matches



[ Top ]
refilterByIndex  [line 647]

  void refilterByIndex( string $index, int 1, boolean 2  )

Selects named elements of the specified index

Parameters:
int   1:  The index (base 1) of the matching node
boolean   2:  True if the selection is to be performed recursively
string   $index:  The pattern segment containing the node expression


[ Top ]
selectAttribute  [line 776]

  void selectAttribute( string $attrName  )

Selects named attributes of the current context nodes

Parameters:
string   $attrName:  The attribute name, or * to match all attributes


[ Top ]
selectNamedChild  [line 830]

  void selectNamedChild( string $tagName  )

Selects all child nodes of the current context nodes

Parameters:
string   $tagName:  The element name


[ Top ]
selectNodesByFunction  [line 918]

  void selectNodesByFunction( )

Selects any nodes of the current context nodes which match the given function



[ Top ]
selectParent  [line 874]

  void selectParent( )

Selects parent node of the current context nodes



[ Top ]
splitPattern  [line 978]

  void splitPattern( string $pattern  )

Splits the supplied pattern into searchable segments

Parameters:
string   $pattern:  The pattern


[ Top ]
updateNodeContainers  [line 219]

  void updateNodeContainers( )

Replaces the global node container with the local node container



[ Top ]
_filterByChildName  [line 744]

  void _filterByChildName( object The &$contextNode, string $nodeName, string $childName, boolean $deep  )

Selects named elements with the specified named child

Parameters:
object The   &$contextNode:  context node
string   $nodeName:  The pattern segment containing the node expression
string   $childName:  The tag name of the matching child
boolean   $deep:  True if the selection is to be performed recursively


[ Top ]
_filterByIndex  [line 698]

  void _filterByIndex( object The &$contextNode, string $nodeName, int $index, boolean $deep  )

Selects named elements of the specified index

Parameters:
object The   &$contextNode:  context node
string   $nodeName:  The pattern segment containing the node expression
int   $index:  The index (base 1) of the matching node
boolean   $deep:  True if the selection is to be performed recursively


[ Top ]
_selectAttribute  [line 795]

  void _selectAttribute( object The &$contextNode, string $attrName, boolean $deep  )

Selects all attributes of the context nodes

Parameters:
object The   &$contextNode:  context node
string   $attrName:  The attribute name, or * to match all attributes
boolean   $deep:  True if the selection is to be performed recursively


[ Top ]
_selectNamedChild  [line 849]

  void _selectNamedChild( object The &$contextNode, string $tagName, [boolean $deep = false]  )

Selects all child nodes of the context node

Parameters:
object The   &$contextNode:  context node
string   $tagName:  The element name
boolean   $deep:  True if the selection is to be performed recursively


[ Top ]
_selectParent  [line 892]

  void _selectParent( object The &$contextNode, [boolean $deep = false]  )

Selects parent node of the current context nodes

Parameters:
object The   &$contextNode:  context node
boolean   $deep:  True if the selection is to be performed recursively


[ Top ]

The site fititnt.org is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. If you are looking for official documentation, visit api.joomla.org and docs.joomla.org.
Documentation generated on Mon, 26 Oct 2009 22:25:04 -0200 by phpDocumentor 1.4.3