1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- namespace Symfony\Component\CssSelector\Node;
- class PseudoNode extends AbstractNode
- {
-
- private $selector;
-
- private $identifier;
-
- public function __construct(NodeInterface $selector, $identifier)
- {
- $this->selector = $selector;
- $this->identifier = strtolower($identifier);
- }
-
- public function getSelector()
- {
- return $this->selector;
- }
-
- public function getIdentifier()
- {
- return $this->identifier;
- }
-
- public function getSpecificity()
- {
- return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0));
- }
-
- public function __toString()
- {
- return sprintf('%s[%s:%s]', $this->getNodeName(), $this->selector, $this->identifier);
- }
- }
|