1<?php 2 3declare(strict_types=1); 4 5/* 6 * This file is part of the TYPO3 project. 7 * 8 * It is free software; you can redistribute it and/or modify it under the terms 9 * of the MIT License (MIT). For the full copyright and license information, 10 * please read the LICENSE file that was distributed with this source code. 11 * 12 * The TYPO3 project - inspiring people to share! 13 */ 14 15namespace TYPO3\HtmlSanitizer\Visitor; 16 17use DOMNode; 18use TYPO3\HtmlSanitizer\Context; 19 20/** 21 * Abstract (fall-back) node visitor. 22 */ 23abstract class AbstractVisitor implements VisitorInterface 24{ 25 public function beforeTraverse(Context $context): void 26 { 27 } 28 29 public function enterNode(DOMNode $node): ?DOMNode 30 { 31 return $node; 32 } 33 34 public function leaveNode(DOMNode $node): ?DOMNode 35 { 36 return $node; 37 } 38 39 public function afterTraverse(Context $context): void 40 { 41 } 42} 43