\QueryPath\CSS\DOMTraverserPseudoClass

The PseudoClass handler.

Summary

Methods
Properties
Constants
elementMatches()
No public properties found
No constants found
lang()
header()
isEmpty()
isFirst()
isFirstOfType()
isLast()
isLastOfType()
contains()
containsExactly()
has()
isNot()
nodePositionFromStart()
nodePositionFromEnd()
isNthChild()
isLocalLink()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

elementMatches()

elementMatches(string  $pseudoclass, resource  $node, resource  $scope, mixed  $value = NULL) 

Tests whether the given element matches the given pseudoclass.

Parameters

string $pseudoclass

The string name of the pseudoclass

resource $node

The DOMNode to be tested.

resource $scope

The DOMElement that is the active root for this node.

mixed $value

The optional value string provided with this class. This is used, for example, in an+b psuedoclasses.

lang()

lang(  $node,   $value) 

Pseudo-class handler for :lang

Note that this does not implement the spec in its entirety because we do not presume to "know the language" of the document. If anyone is interested in making this more intelligent, please do so.

Parameters

$node
$value

header()

header(  $node) 

Provides jQuery pseudoclass ':header'.

Parameters

$node

isEmpty()

isEmpty(  $node) 

Provides pseudoclass :empty.

Parameters

$node

isFirst()

isFirst(  $node) 

Provides jQuery pseudoclass :first.

Parameters

$node

isFirstOfType()

isFirstOfType(  $node) 

Fast version of first-of-type.

Parameters

$node

isLast()

isLast(  $node) 

Fast version of jQuery :last.

Parameters

$node

isLastOfType()

isLastOfType(  $node) 

Provides last-of-type.

Parameters

$node

contains()

contains(  $node,   $value) 

Provides :contains() as the original spec called for.

This is an INEXACT match.

Parameters

$node
$value

containsExactly()

containsExactly(  $node,   $value) 

Provides :contains-exactly QueryPath pseudoclass.

This is an EXACT match.

Parameters

$node
$value

has()

has(  $node,   $selector) 

Provides :has pseudoclass.

Parameters

$node
$selector

isNot()

isNot(  $node,   $selector) 

Provides :not pseudoclass.

Parameters

$node
$selector

nodePositionFromStart()

nodePositionFromStart(  $node,   $byType = FALSE) 

Get the relative position of a node in its sibling set.

Parameters

$node
$byType

nodePositionFromEnd()

nodePositionFromEnd(  $node,   $byType = FALSE) 

Get the relative position of a node in its sibling set.

Parameters

$node
$byType

isNthChild()

isNthChild(  $node,   $value,   $reverse = FALSE,   $byType = FALSE) 

Provides functionality for all "An+B" rules.

Provides nth-child and also the functionality required for:

  • nth-last-child
  • even
  • odd
  • first
  • last
  • eq
  • nth
  • nth-of-type
  • first-of-type
  • last-of-type
  • nth-last-of-type

See also QueryPath::CSS::DOMTraverser::Util::parseAnB().

Parameters

$node
$value
$reverse
$byType

isLocalLink()

isLocalLink(  $node) 

Parameters

$node