PHP Class QueryPath\CSS\DOMTraverser\PseudoClass

Exibir arquivo Open project: microweber/microweber Class Usage Examples

Public Methods

Method Description
elementMatches ( string $pseudoclass, resource $node, resource $scope, mixed $value = null ) Tests whether the given element matches the given pseudoclass.

Protected Methods

Method Description
contains ( $node, $value ) Provides :contains() as the original spec called for.
containsExactly ( $node, $value ) Provides :contains-exactly QueryPath pseudoclass.
has ( $node, $selector ) Provides :has pseudoclass.
header ( $node ) Provides jQuery pseudoclass ':header'.
isEmpty ( $node ) Provides pseudoclass :empty.
isFirst ( $node ) Provides jQuery pseudoclass :first.
isFirstOfType ( $node ) Fast version of first-of-type.
isLast ( $node ) Fast version of jQuery :last.
isLastOfType ( $node ) Provides last-of-type.
isLocalLink ( $node )
isNot ( $node, $selector ) Provides :not pseudoclass.
isNthChild ( $node, $value, $reverse = false, $byType = false ) Provides functionality for all "An+B" rules.
lang ( $node, $value ) Pseudo-class handler for :lang.
nodePositionFromEnd ( $node, $byType = false ) Get the relative position of a node in its sibling set.
nodePositionFromStart ( $node, $byType = false ) Get the relative position of a node in its sibling set.

Method Details

contains() protected method

This is an INEXACT match.
protected contains ( $node, $value )

containsExactly() protected method

This is an EXACT match.
protected containsExactly ( $node, $value )

elementMatches() public method

Tests whether the given element matches the given pseudoclass.
public elementMatches ( string $pseudoclass, resource $node, resource $scope, mixed $value = null )
$pseudoclass string The string name of the pseudoclass
$node resource The DOMNode to be tested.
$scope resource The DOMElement that is the active root for this node.
$value mixed The optional value string provided with this class. This is used, for example, in an+b psuedoclasses.

has() protected method

Provides :has pseudoclass.
protected has ( $node, $selector )

header() protected method

Provides jQuery pseudoclass ':header'.
protected header ( $node )

isEmpty() protected method

Provides pseudoclass :empty.
protected isEmpty ( $node )

isFirst() protected method

Provides jQuery pseudoclass :first.
protected isFirst ( $node )

isFirstOfType() protected method

Fast version of first-of-type.
protected isFirstOfType ( $node )

isLast() protected method

Fast version of jQuery :last.
protected isLast ( $node )

isLastOfType() protected method

Provides last-of-type.
protected isLastOfType ( $node )

isNot() protected method

Provides :not pseudoclass.
protected isNot ( $node, $selector )

isNthChild() protected method

Provides ntoh-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().
protected isNthChild ( $node, $value, $reverse = false, $byType = false )

lang() protected method

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.
protected lang ( $node, $value )

nodePositionFromEnd() protected method

Get the relative position of a node in its sibling set.
protected nodePositionFromEnd ( $node, $byType = false )

nodePositionFromStart() protected method

Get the relative position of a node in its sibling set.
protected nodePositionFromStart ( $node, $byType = false )