PHP Class QueryPath\CSS\DOMTraverser\Util

Show file Open project: microweber/microweber Class Usage Examples

Public Methods

Method Description
matchesAttribute ( $node, $name, $value = null, $operation = EventHandler::isExactly ) Check whether the given DOMElement has the given attribute.
matchesAttributeNS ( $node, $name, $nsuri, $value = null, $operation = EventHandler::isExactly ) Check whether the given DOMElement has the given namespaced attribute.
matchesAttributeValue ( $needle, $haystack, $operation ) Check for attr value matches based on an operation.
parseAnB ( $rule ) Parse an an+b rule for CSS pseudo-classes.
removeQuotes ( $str ) Remove leading and trailing quotes.

Method Details

matchesAttribute() public static method

Check whether the given DOMElement has the given attribute.
public static matchesAttribute ( $node, $name, $value = null, $operation = EventHandler::isExactly )

matchesAttributeNS() public static method

Check whether the given DOMElement has the given namespaced attribute.
public static matchesAttributeNS ( $node, $name, $nsuri, $value = null, $operation = EventHandler::isExactly )

matchesAttributeValue() public static method

Check for attr value matches based on an operation.
public static matchesAttributeValue ( $needle, $haystack, $operation )

parseAnB() public static method

Invalid rules return array(0, 0). This is per the spec.
public static parseAnB ( $rule )
$rule Some rule in the an+b format.

removeQuotes() public static method

Remove leading and trailing quotes.
public static removeQuotes ( $str )