diff options
Diffstat (limited to 'src/Nodes')
-rw-r--r-- | src/Nodes/DOM/DOMDocument.php | 3 | ||||
-rw-r--r-- | src/Nodes/DOM/DOMEntity.php | 10 | ||||
-rw-r--r-- | src/Nodes/NodeTrait.php | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/Nodes/DOM/DOMDocument.php b/src/Nodes/DOM/DOMDocument.php index a83f5b9..81e9c7d 100644 --- a/src/Nodes/DOM/DOMDocument.php +++ b/src/Nodes/DOM/DOMDocument.php @@ -20,10 +20,11 @@ class DOMDocument extends \DOMDocument $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); - $this->registerNodeClass('DOMEntityReference', DOMEntityReference::class); } } diff --git a/src/Nodes/DOM/DOMEntity.php b/src/Nodes/DOM/DOMEntity.php new file mode 100644 index 0000000..8493e73 --- /dev/null +++ b/src/Nodes/DOM/DOMEntity.php @@ -0,0 +1,10 @@ +<?php + +namespace andreskrey\Readability\Nodes\DOM; + +use andreskrey\Readability\Nodes\NodeTrait; + +class DOMEntity extends \DOMEntity +{ + use NodeTrait; +} diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php index 5a3cd7f..bb848ab 100644 --- a/src/Nodes/NodeTrait.php +++ b/src/Nodes/NodeTrait.php @@ -7,6 +7,10 @@ use andreskrey\Readability\Nodes\DOM\DOMElement; use andreskrey\Readability\Nodes\DOM\DOMNode; use andreskrey\Readability\Nodes\DOM\DOMText; + +/** + * @method \DOMNode removeAttribute($name) + */ trait NodeTrait { /** |