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