class HashNode in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/css-selector/Node/HashNode.php \Symfony\Component\CssSelector\Node\HashNode
Represents a "<selector>#<id>" node.
This component is a port of the Python cssselect library, which is copyright Ian Bicking, @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
Hierarchy
- class \Symfony\Component\CssSelector\Node\AbstractNode implements NodeInterface
- class \Symfony\Component\CssSelector\Node\HashNode
Expanded class hierarchy of HashNode
See also
https://github.com/SimonSapin/cssselect.
2 files declare their use of HashNode
- HashNodeTest.php in vendor/
symfony/ css-selector/ Tests/ Node/ HashNodeTest.php - HashParser.php in vendor/
symfony/ css-selector/ Parser/ Shortcut/ HashParser.php
File
- vendor/
symfony/ css-selector/ Node/ HashNode.php, line 22
Namespace
Symfony\Component\CssSelector\NodeView source
class HashNode extends AbstractNode {
/**
* @var NodeInterface
*/
private $selector;
/**
* @var string
*/
private $id;
/**
* @param NodeInterface $selector
* @param string $id
*/
public function __construct(NodeInterface $selector, $id) {
$this->selector = $selector;
$this->id = $id;
}
/**
* @return NodeInterface
*/
public function getSelector() {
return $this->selector;
}
/**
* @return string
*/
public function getId() {
return $this->id;
}
/**
* {@inheritdoc}
*/
public function getSpecificity() {
return $this->selector
->getSpecificity()
->plus(new Specificity(1, 0, 0));
}
/**
* {@inheritdoc}
*/
public function __toString() {
return sprintf('%s[%s#%s]', $this
->getNodeName(), $this->selector, $this->id);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractNode:: |
private | property | ||
AbstractNode:: |
public | function |
Overrides NodeInterface:: |
|
HashNode:: |
private | property | ||
HashNode:: |
private | property | ||
HashNode:: |
public | function | ||
HashNode:: |
public | function | ||
HashNode:: |
public | function |
Returns node's specificity. Overrides NodeInterface:: |
|
HashNode:: |
public | function | ||
HashNode:: |
public | function |
Returns node's string representation. Overrides NodeInterface:: |