Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\CssSelector\Node; Chris@0: Chris@0: /** Chris@0: * Abstract base node class. Chris@0: * Chris@0: * This component is a port of the Python cssselect library, Chris@0: * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. Chris@0: * Chris@0: * @author Jean-François Simon Chris@0: * Chris@0: * @internal Chris@0: */ Chris@0: abstract class AbstractNode implements NodeInterface Chris@0: { Chris@0: /** Chris@0: * @var string Chris@0: */ Chris@0: private $nodeName; Chris@0: Chris@0: /** Chris@0: * @return string Chris@0: */ Chris@0: public function getNodeName() Chris@0: { Chris@0: if (null === $this->nodeName) { Chris@17: $this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', \get_called_class()); Chris@0: } Chris@0: Chris@0: return $this->nodeName; Chris@0: } Chris@0: }