* * 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:----XKGP63U6d+vSbLFiyZAJ1/t4/TgVP4awiIHcNCnBuVtvsswatUaMQbkmTdxTA5QdTtPds6K1wu1h1HsbHe1+FsjfP6DU+xeSN7lvDbPny2QzcCP8PPvyiNq/NPvZU4LuKjYWEUyRHxCMNa1/jzF8DG9woU71kdHmIKT9V/N0GTEHsJbdsxktM+NNUPRxBVvovbdwLjzY0or0dswZcgFJbzKmK+3UBGz6Aq8jUEkknowQBMgrMkInhag6DojjEMu9KeBIzhpa4+9Woa1P7/PRbk1qpWwYmV35gNkyLtOUKjkF/Cung+TXZhSbH/ALbUj85MvPx00VPugUvdgrQ06m1DlfwXXXqdE3eKVBjammi3bZgONZ2rT9lVAWr92V7zf5FqPlGPxYmdSIgoUmiA3Krf+E9PfWao12oGMZgwWQW8TqBO6YvcEJgP6kXbQE25YVFgTBmGw+dj/r031JM1NRS18xaz2IlA7J1Vq3VHJTPRV8pIl8t4W9SXZW9H7EKHwrY10daB0haSwE0zuHHsLdlxsPHflJRSDjIxlFY9Sbr4x3VYZp11PV1YB8syhNiC8xIfLsL/wurTSgLCFfCFiwNtiaukKZ7yYA5NtvzG4N/xaRN5jEAZ5yUFujcAT7nWp4CcDcWuTvmLSj3JjeX4K5H0PTUZwOv1kqE3/OM+sSQR0=----ATTACHMENT:----MjIyMTU2MzUzNzMwMDc0MiA3MzI0MzQ2NjIzODg5OTQ2IDgzODY4MzA3NjAyMzUyMDY=