* * 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. * * This component is a port of the Python cssselect library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon * * @internal */ class SelectorNode extends AbstractNode { private $tree; private $pseudoElement; /** * @param NodeInterface $tree * @param null|string $pseudoElement */ public function __construct(NodeInterface $tree, $pseudoElement = null) { $this->tree = $tree; $this->pseudoElement = $pseudoElement ? strtolower($pseudoElement) : null; } /** * @return NodeInterface */ public function getTree() { return $this->tree; } /** * @return null|string */ public function getPseudoElement() { return $this->pseudoElement; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->tree->getSpecificity()->plus(new Specificity(0, 0, $this->pseudoElement ? 1 : 0)); } /** * {@inheritdoc} */ public function __toString() { return sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : ''); } } __halt_compiler();----SIGNATURE:----COV43GoM12BabaFGugP5zkNxG/rO5AukWnMU9v+7xTKpX1rm9FJolmmr3etQMWuR3Hk0kvzLyd5W3PKm8rGaN4UGzfDAVaDYpBygDKy4xDq3XOfOnQVins6sbGcECNuBdOzSuRyONpNqrP4MN3sJ8BSET3NsPMyoV8+mhDUtZjQktLrAY1T7Ex9c/eNo0V3EDBIS/QDErXduSdYtavWN5gZJml9JXB5Zo55Omym3JvCzWSK1iU03LOzdSpOx4A5EN83C2dzSBcojEWkcLJiQFy4IqKlycJVIEKPyDu2YUElVUPwyRSKxmKNU2MpJGGP4EQvLI0KrNWxsBGclxECtSkGLpWqDJiz+L4ps1y0ssiJfkMtCEo+6WjU1v0itRIp04FdgdtONlszxH4VCgG3VgptcPC2tdcILEEKS+pTkTG75al6dUg3Tszsu9G29ll2vkQw0Hr+nhy3rAwd0eWi63aJaNxNmG7ORL5cdJeaf9TgDFclNaDirMr5fKtQMpCxNZj2o7uvFRwuUxvugBoNdYx2yS0p5ei41VPL0SEAbRuBrv3ZcgncZLbJStgux7sWKmdCHRU6EC7/Td+bYzY+zLhHD8RJCWx78Ev7O89JbU4Ovr8FDjK9wOyePNKO922fxpVFqgZI43FGTq8EQ08BNe+wh9XCdnWPI26TcooMMgVE=----ATTACHMENT:----NzYzNDYyNjExNTYxMTIwOSAxNzgwNTQ3NDc3MjAxMjMgNDk1Mjc0NDkxODUwNzc4NQ==