PHP Класс QueryPath\CSS\DOMTraverser\PseudoClass

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
elementMatches ( string $pseudoclass, resource $node, resource $scope, mixed $value = null ) Tests whether the given element matches the given pseudoclass.

Защищенные методы

Метод Описание
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.

Описание методов

contains() защищенный Метод

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

containsExactly() защищенный Метод

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

elementMatches() публичный Метод

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() защищенный Метод

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

header() защищенный Метод

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

isEmpty() защищенный Метод

Provides pseudoclass :empty.
protected isEmpty ( $node )

isFirst() защищенный Метод

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

isFirstOfType() защищенный Метод

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

isLast() защищенный Метод

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

isLastOfType() защищенный Метод

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

isNot() защищенный Метод

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

isNthChild() защищенный Метод

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() защищенный Метод

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() защищенный Метод

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

nodePositionFromStart() защищенный Метод

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