diff options
author | Andrew Dolgov <[email protected]> | 2022-07-16 16:30:46 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-07-16 16:30:46 +0300 |
commit | b8c1d622a77226b14fb307cfe3e0f4cea9e4268a (patch) | |
tree | 3df519798dcfef20c96a079e0956ebcd5509b619 /plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM | |
parent | fdd1c43612011060b4b876db438eb7ec62dd077d (diff) |
add missing files for forked idiorm
Diffstat (limited to 'plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM')
15 files changed, 65 insertions, 29 deletions
diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMAttr.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMAttr.php index 91729f3b1..1bdf395e7 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMAttr.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMAttr.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMAttr extends \DOMAttr { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMCdataSection.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMCdataSection.php index 4535e4e99..6ac3dcdfc 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMCdataSection.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMCdataSection.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMCdataSection extends \DOMCdataSection { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMCharacterData.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMCharacterData.php index e4db11a06..b196979fc 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMCharacterData.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMCharacterData.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMCharacterData extends \DOMCharacterData { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMComment.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMComment.php index 13b004aff..3b691f486 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMComment.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMComment.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMComment extends \DOMComment { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocument.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocument.php index 81e9c7de6..d91233807 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocument.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocument.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMDocument extends \DOMDocument { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocumentFragment.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocumentFragment.php index bcb89468d..33a3f950a 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocumentFragment.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocumentFragment.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMDocumentFragment extends \DOMDocumentFragment { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocumentType.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocumentType.php index 18705a7a7..cf3cd0f88 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocumentType.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMDocumentType.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMDocumentType extends \DOMDocumentType { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMElement.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMElement.php index c07670bf7..b0da84fb9 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMElement.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMElement.php @@ -1,10 +1,46 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMElement extends \DOMElement { use NodeTrait; + + /** + * Returns the child elements of this element. + * + * To get all child nodes, including non-element nodes like text and comment nodes, use childNodes. + * + * @return DOMNodeList + */ + public function children() + { + $newList = new DOMNodeList(); + foreach ($this->childNodes as $node) { + if ($node->nodeType === XML_ELEMENT_NODE) { + $newList->add($node); + } + } + return $newList; + } + + /** + * Returns the Element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list. + * + * @see https://wiki.php.net/rfc/dom_living_standard_api + * @return DOMElement|null + */ + public function previousElementSibling() + { + $previous = $this->previousSibling; + while ($previous) { + if ($previous->nodeType === XML_ELEMENT_NODE) { + return $previous; + } + $previous = $previous->previousSibling; + } + return null; + } } diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMEntity.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMEntity.php index 8493e7319..751b59c48 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMEntity.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMEntity.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMEntity extends \DOMEntity { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMEntityReference.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMEntityReference.php index 32cecb75c..d6fd6d49c 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMEntityReference.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMEntityReference.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMEntityReference extends \DOMEntityReference { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNode.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNode.php index 7c3c4f3a2..4a3ab0dc3 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNode.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNode.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; /** * @method getAttribute($attribute) diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNodeList.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNodeList.php index 5149c0b98..a718c00ce 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNodeList.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNodeList.php @@ -1,6 +1,6 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; /** * Class DOMNodeList. diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNotation.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNotation.php index 2e888ce00..d276e42a4 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNotation.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMNotation.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMNotation extends \DOMNotation { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMProcessingInstruction.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMProcessingInstruction.php index 9dd4c5c70..82c69cf01 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMProcessingInstruction.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMProcessingInstruction.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMProcessingInstruction extends \DOMProcessingInstruction { diff --git a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMText.php b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMText.php index 42c575b49..6a5716c92 100644 --- a/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMText.php +++ b/plugins/af_readability/vendor/fivefilters/readability.php/src/Nodes/DOM/DOMText.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\Nodes\DOM; +namespace fivefilters\Readability\Nodes\DOM; -use andreskrey\Readability\Nodes\NodeTrait; +use fivefilters\Readability\Nodes\NodeTrait; class DOMText extends \DOMText { |