PHP Class QueryPath\CSS\DOMTraverser\PseudoClass

Afficher le fichier Open project: microweber/microweber Class Usage Examples

Méthodes publiques

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

Méthodes protégées

Méthode 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 méthode

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

containsExactly() protected méthode

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

elementMatches() public méthode

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 méthode

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

header() protected méthode

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

isEmpty() protected méthode

Provides pseudoclass :empty.
protected isEmpty ( $node )

isFirst() protected méthode

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

isFirstOfType() protected méthode

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

isLast() protected méthode

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

isLastOfType() protected méthode

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

isNot() protected méthode

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

isNthChild() protected méthode

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 méthode

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 méthode

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

nodePositionFromStart() protected méthode

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