\QueryPath\CSS\DOMTraverserUtil

Utilities for DOM Traversal.

Summary

Methods
Properties
Constants
matchesAttribute()
matchesAttributeNS()
matchesAttributeValue()
removeQuotes()
parseAnB()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

matchesAttribute()

matchesAttribute(  $node,   $name,   $value = NULL,   $operation = \QueryPath\CSS\EventHandler::isExactly) 

Check whether the given DOMElement has the given attribute.

Parameters

$node
$name
$value
$operation

matchesAttributeNS()

matchesAttributeNS(  $node,   $name,   $nsuri,   $value = NULL,   $operation = \QueryPath\CSS\EventHandler::isExactly) 

Check whether the given DOMElement has the given namespaced attribute.

Parameters

$node
$name
$nsuri
$value
$operation

matchesAttributeValue()

matchesAttributeValue(  $needle,   $haystack,   $operation) 

Check for attr value matches based on an operation.

Parameters

$needle
$haystack
$operation

removeQuotes()

removeQuotes(  $str) 

Remove leading and trailing quotes.

Parameters

$str

parseAnB()

parseAnB(  $rule) 

Parse an an+b rule for CSS pseudo-classes.

Invalid rules return array(0, 0). This is per the spec.

Parameters

$rule

Some rule in the an+b format.