class ClassNode in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/css-selector/Node/ClassNode.php \Symfony\Component\CssSelector\Node\ClassNode
- 8 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php \Prophecy\Doubler\Generator\Node\ClassNode
Same name and namespace in other branches
- 8.0 vendor/symfony/css-selector/Node/ClassNode.php \Symfony\Component\CssSelector\Node\ClassNode
Represents a "<selector>.<name>" 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\ClassNode
Expanded class hierarchy of ClassNode
See also
https://github.com/SimonSapin/cssselect.
3 files declare their use of ClassNode
- ClassNodeTest.php in vendor/
symfony/ css-selector/ Tests/ Node/ ClassNodeTest.php - ClassParser.php in vendor/
symfony/ css-selector/ Parser/ Shortcut/ ClassParser.php - NegationNodeTest.php in vendor/
symfony/ css-selector/ Tests/ Node/ NegationNodeTest.php
File
- vendor/
symfony/ css-selector/ Node/ ClassNode.php, line 22
Namespace
Symfony\Component\CssSelector\NodeView source
class ClassNode extends AbstractNode {
/**
* @var NodeInterface
*/
private $selector;
/**
* @var string
*/
private $name;
/**
* @param NodeInterface $selector
* @param string $name
*/
public function __construct(NodeInterface $selector, $name) {
$this->selector = $selector;
$this->name = $name;
}
/**
* @return NodeInterface
*/
public function getSelector() {
return $this->selector;
}
/**
* @return string
*/
public function getName() {
return $this->name;
}
/**
* {@inheritdoc}
*/
public function getSpecificity() {
return $this->selector
->getSpecificity()
->plus(new Specificity(0, 1, 0));
}
/**
* {@inheritdoc}
*/
public function __toString() {
return sprintf('%s[%s.%s]', $this
->getNodeName(), $this->selector, $this->name);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractNode:: |
private | property | ||
AbstractNode:: |
public | function |
Overrides NodeInterface:: |
|
ClassNode:: |
private | property | ||
ClassNode:: |
private | property | ||
ClassNode:: |
public | function | ||
ClassNode:: |
public | function | ||
ClassNode:: |
public | function |
Returns node's specificity. Overrides NodeInterface:: |
|
ClassNode:: |
public | function | ||
ClassNode:: |
public | function |
Returns node's string representation. Overrides NodeInterface:: |