/opt/alt/php55/usr/share/pear/Symfony/Component/CssSelector/Node
NameSizeModeActions
AbstractNode.php9200644editdlrm
AttributeNode.php26350644editdlrm
ClassNode.php15190644editdlrm
CombinedSelectorNode.php19920644editdlrm
ElementNode.php16060644editdlrm
FunctionNode.php20750644editdlrm
HashNode.php15000644editdlrm
NegationNode.php16340644editdlrm
NodeInterface.php9200644editdlrm
PseudoNode.php15860644editdlrm
SelectorNode.php16840644editdlrm
Specificity.php15630644editdlrm
Edit: /opt/alt/php55/usr/share/pear/Symfony/Component/CssSelector/Node/SelectorNode.php (1684B)
* * 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 cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class SelectorNode extends AbstractNode { /** * @var NodeInterface */ private $tree; /** * @var null|string */ 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 : ''); } }