4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\CssSelector\Node
;
15 * Abstract base node class.
17 * This component is a port of the Python cssselect library,
18 * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
20 * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
24 abstract class AbstractNode
implements NodeInterface
31 public function getNodeName(): string
33 if (null === $this->nodeName
) {
34 $this->nodeName
= preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', static::class);
37 return $this->nodeName
;