W3cubDocs

/Symfony 2.8

Symfony\Component\CssSelector\Node\Specificity

class Specificity

Represents a node specificity.

This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect.

Constants

A_FACTOR
B_FACTOR
C_FACTOR

Methods

__construct(int $a, int $b, int $c)

Constructor.

Specificity plus(Specificity $specificity)
int getValue()

Returns global specificity value.

int compareTo(Specificity $specificity)

Returns -1 if the object specificity is lower than the argument, 0 if they are equal, and 1 if the argument is lower.

Details

public __construct(int $a, int $b, int $c)

Constructor.

Parameters

int $a
int $b
int $c

public Specificity plus(Specificity $specificity)

Parameters

Specificity $specificity

Return Value

Specificity

public int getValue()

Returns global specificity value.

Return Value

int

public int compareTo(Specificity $specificity)

Returns -1 if the object specificity is lower than the argument, 0 if they are equal, and 1 if the argument is lower.

Parameters

Specificity $specificity

Return Value

int

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/CssSelector/Node/Specificity.html