diff options
Diffstat (limited to 'src/Nodes/DOMDocument.php')
-rw-r--r-- | src/Nodes/DOMDocument.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Nodes/DOMDocument.php b/src/Nodes/DOMDocument.php new file mode 100644 index 0000000..f954f7d --- /dev/null +++ b/src/Nodes/DOMDocument.php @@ -0,0 +1,26 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMDocument extends \DOMDocument +{ + use NodeTrait; + + public function __construct($version, $encoding) + { + parent::__construct($version, $encoding); + + $this->registerNodeClass('DOMAttr', DOMAttr::class); + $this->registerNodeClass('DOMCdataSection', DOMCdataSection::class); + $this->registerNodeClass('DOMCharacterData', DOMCharacterData::class); + $this->registerNodeClass('DOMComment', DOMComment::class); + $this->registerNodeClass('DOMDocument', DOMDocument::class); + $this->registerNodeClass('DOMDocumentFragment', DOMDocumentFragment::class); + $this->registerNodeClass('DOMDocumentType', DOMDocumentType::class); + $this->registerNodeClass('DOMElement', DOMElement::class); + $this->registerNodeClass('DOMNode', DOMNode::class); + $this->registerNodeClass('DOMNotation', DOMNotation::class); + $this->registerNodeClass('DOMProcessingInstruction', DOMProcessingInstruction::class); + $this->registerNodeClass('DOMText', DOMText::class); + } +} |