diff options
author | Andrew Dolgov <[email protected]> | 2018-06-20 14:58:09 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-06-20 14:58:09 +0300 |
commit | 2aaefbfa54447c37a74aaf126f864fac629e9bd5 (patch) | |
tree | 971c158cde0e95b7610c0a3d3072c45338cddd7d /vendor/andreskrey/Readability/Nodes/DOM/DOMDocument.php | |
parent | d00d515320adb57165f7a69bd1c9afc72d51b87f (diff) |
update autoloader to consider namespaces for third party libraries: placed and loaded from vendor/namespace/classpath.php
update readability to a newer implementation based on Readability.js (https://github.com/andreskrey/readability.php)
add vendor/Psr/Log interface required for the above
Diffstat (limited to 'vendor/andreskrey/Readability/Nodes/DOM/DOMDocument.php')
-rw-r--r-- | vendor/andreskrey/Readability/Nodes/DOM/DOMDocument.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/andreskrey/Readability/Nodes/DOM/DOMDocument.php b/vendor/andreskrey/Readability/Nodes/DOM/DOMDocument.php new file mode 100644 index 000000000..81e9c7de6 --- /dev/null +++ b/vendor/andreskrey/Readability/Nodes/DOM/DOMDocument.php @@ -0,0 +1,30 @@ +<?php + +namespace andreskrey\Readability\Nodes\DOM; + +use andreskrey\Readability\Nodes\NodeTrait; + +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', self::class); + $this->registerNodeClass('DOMDocumentFragment', DOMDocumentFragment::class); + $this->registerNodeClass('DOMDocumentType', DOMDocumentType::class); + $this->registerNodeClass('DOMElement', DOMElement::class); + $this->registerNodeClass('DOMEntity', DOMEntity::class); + $this->registerNodeClass('DOMEntityReference', DOMEntityReference::class); + $this->registerNodeClass('DOMNode', DOMNode::class); + $this->registerNodeClass('DOMNotation', DOMNotation::class); + $this->registerNodeClass('DOMProcessingInstruction', DOMProcessingInstruction::class); + $this->registerNodeClass('DOMText', DOMText::class); + } +} |