AbstractNode.php
2 months ago
AttributeNode.php
2 months ago
ClassNode.php
2 months ago
CombinedSelectorNode.php
2 months ago
ElementNode.php
2 months ago
FunctionNode.php
2 months ago
HashNode.php
2 months ago
NegationNode.php
2 months ago
NodeInterface.php
2 months ago
PseudoNode.php
2 months ago
SelectorNode.php
2 months ago
Specificity.php
2 months ago
AbstractNode.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace ProfilePressVendor\Symfony\Component\CssSelector\Node; |
| 12 | |
| 13 | /** |
| 14 | * Abstract base node class. |
| 15 | * |
| 16 | * This component is a port of the Python cssselect library, |
| 17 | * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. |
| 18 | * |
| 19 | * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com> |
| 20 | * |
| 21 | * @internal |
| 22 | */ |
| 23 | abstract class AbstractNode implements NodeInterface |
| 24 | { |
| 25 | /** |
| 26 | * @var string |
| 27 | */ |
| 28 | private $nodeName; |
| 29 | public function getNodeName(): string |
| 30 | { |
| 31 | if (null === $this->nodeName) { |
| 32 | $this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', static::class); |
| 33 | } |
| 34 | return $this->nodeName; |
| 35 | } |
| 36 | } |
| 37 |