Html5Parser.php
22 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Util\pQuery; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoetVendor\pQuery\Html5Parser as pQueryHtml5Parser; |
| 9 | |
| 10 | class Html5Parser extends pQueryHtml5Parser { |
| 11 | /** |
| 12 | * Override the default root class so the parent's auto-create-root |
| 13 | * pattern instantiates our DomNode subclass. Before construction this |
| 14 | * holds a class-name string; after construction the parent constructor |
| 15 | * replaces it with an instance — see HtmlParser::__construct. |
| 16 | * |
| 17 | * @var class-string<DomNode>|DomNode |
| 18 | * @phpstan-ignore property.phpDocType |
| 19 | */ |
| 20 | public $root = DomNode::class; |
| 21 | } |
| 22 |