* * 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:----PZnaujpvxziu8ao8q/1dWkCdSNhAiNbcDT8RbjrLn6c9iLiS+E4tkPkF93RaOMCM9s23YAF5CNPB9ZefIBnJVM6ZTLsZQnDkAsGE535uKIejQzW3c0XPEZEz0HeW5AOTKl3bHkoWZxHiIS+9ylDUdcznttYQEI2dLRLvwgkM5raUmfSAIWNfvZxanMAFbWBmEX+Ckf5/GXKJki8CYd0xq5/THtbZNLT/6MRmusWCvczYmesYUZUNr6WZgEE2DdsFApb/xYQccYIaBURRYDewktevW2IzqbOFzgLk8VmPXr3f8MRBVoxdvJmDSUPI7qrYdvP+dTQP7FHHt3IBBK/eXBDlQhyTqEXun9aLUHTjymU4B7BqGoVsxsanlDBrEqX25TWU0m0prBgdL+DQd5k0qW7hjBeH/cRplTvpnJMt9uRBSLaFBmksBnauDuQTGqqjyQ0aBj2P21al16EgYHezIku5r/GDZvFupkqEV5T7daw5oNKajUTFvl9hXv0Gd23IiW1Yo8Qto5VRaGXY1JcB2Kbqbq0HGB3CQfp0rQjvjDwdJxOp0V+BPke7S8Nj2qogaV4yoB2FTRAvfHo1w8t5cU/P7qmxzBXhWSBwOGNvSqrggnx345bKAwIQNBM/xT+2SqBmjgssCRKsho0tC5dOf+g9RbYGr+RZLcakGy1F8rM=----ATTACHMENT:----MjM0MTc4NzM1MTgwMzY2MSAyMTAxMTQ0MzIyNDA2NjQwIDk0NTExMDk1Mjk3MTcxNg==