diff options
Diffstat (limited to 'src')
24 files changed, 93 insertions, 99 deletions
diff --git a/src/NodeClass/DOMAttr.php b/src/NodeClass/DOMAttr.php deleted file mode 100644 index ea8672d..0000000 --- a/src/NodeClass/DOMAttr.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMAttr extends \DOMAttr -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMCdataSection.php b/src/NodeClass/DOMCdataSection.php deleted file mode 100644 index 438ac99..0000000 --- a/src/NodeClass/DOMCdataSection.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMCdataSection extends \DOMCdataSection -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMCharacterData.php b/src/NodeClass/DOMCharacterData.php deleted file mode 100644 index 480980e..0000000 --- a/src/NodeClass/DOMCharacterData.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMCharacterData extends \DOMCharacterData -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMComment.php b/src/NodeClass/DOMComment.php deleted file mode 100644 index 416460b..0000000 --- a/src/NodeClass/DOMComment.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMComment extends \DOMComment -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMDocumentFragment.php b/src/NodeClass/DOMDocumentFragment.php deleted file mode 100644 index cc8b753..0000000 --- a/src/NodeClass/DOMDocumentFragment.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMDocumentFragment extends \DOMDocumentFragment -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMDocumentType.php b/src/NodeClass/DOMDocumentType.php deleted file mode 100644 index 13f7829..0000000 --- a/src/NodeClass/DOMDocumentType.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMDocumentType extends \DOMDocumentType -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMElement.php b/src/NodeClass/DOMElement.php deleted file mode 100644 index a7dc36a..0000000 --- a/src/NodeClass/DOMElement.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMElement extends \DOMElement -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMNode.php b/src/NodeClass/DOMNode.php deleted file mode 100644 index c9ed1c3..0000000 --- a/src/NodeClass/DOMNode.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -/** - * Class DOMNode - * - * @method getAttribute($attribute) - * @package andreskrey\Readability\NodeClass - */ -class DOMNode extends \DOMNode -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMNotation.php b/src/NodeClass/DOMNotation.php deleted file mode 100644 index 3e09bbc..0000000 --- a/src/NodeClass/DOMNotation.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMNotation extends \DOMNotation -{ - use NodeClassTrait; -} diff --git a/src/NodeClass/DOMText.php b/src/NodeClass/DOMText.php deleted file mode 100644 index 80ef6c8..0000000 --- a/src/NodeClass/DOMText.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace andreskrey\Readability\NodeClass; - -class DOMText extends \DOMText -{ - use NodeClassTrait; -} diff --git a/src/Nodes/DOMAttr.php b/src/Nodes/DOMAttr.php new file mode 100644 index 0000000..c31517a --- /dev/null +++ b/src/Nodes/DOMAttr.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMAttr extends \DOMAttr +{ + use NodeTrait; +} diff --git a/src/Nodes/DOMCdataSection.php b/src/Nodes/DOMCdataSection.php new file mode 100644 index 0000000..f3a56f0 --- /dev/null +++ b/src/Nodes/DOMCdataSection.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMCdataSection extends \DOMCdataSection +{ + use NodeTrait; +} diff --git a/src/Nodes/DOMCharacterData.php b/src/Nodes/DOMCharacterData.php new file mode 100644 index 0000000..e5087d9 --- /dev/null +++ b/src/Nodes/DOMCharacterData.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMCharacterData extends \DOMCharacterData +{ + use NodeTrait; +} diff --git a/src/Nodes/DOMComment.php b/src/Nodes/DOMComment.php new file mode 100644 index 0000000..fd2b8b5 --- /dev/null +++ b/src/Nodes/DOMComment.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMComment extends \DOMComment +{ + use NodeTrait; +} diff --git a/src/NodeClass/DOMDocument.php b/src/Nodes/DOMDocument.php index f379268..f954f7d 100644 --- a/src/NodeClass/DOMDocument.php +++ b/src/Nodes/DOMDocument.php @@ -1,10 +1,10 @@ <?php -namespace andreskrey\Readability\NodeClass; +namespace andreskrey\Readability\Nodes; class DOMDocument extends \DOMDocument { - use NodeClassTrait; + use NodeTrait; public function __construct($version, $encoding) { diff --git a/src/Nodes/DOMDocumentFragment.php b/src/Nodes/DOMDocumentFragment.php new file mode 100644 index 0000000..d5f013e --- /dev/null +++ b/src/Nodes/DOMDocumentFragment.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMDocumentFragment extends \DOMDocumentFragment +{ + use NodeTrait; +} diff --git a/src/Nodes/DOMDocumentType.php b/src/Nodes/DOMDocumentType.php new file mode 100644 index 0000000..81e426b --- /dev/null +++ b/src/Nodes/DOMDocumentType.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMDocumentType extends \DOMDocumentType +{ + use NodeTrait; +} diff --git a/src/Nodes/DOMElement.php b/src/Nodes/DOMElement.php new file mode 100644 index 0000000..6ca0a29 --- /dev/null +++ b/src/Nodes/DOMElement.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMElement extends \DOMElement +{ + use NodeTrait; +} diff --git a/src/Nodes/DOMNode.php b/src/Nodes/DOMNode.php new file mode 100644 index 0000000..79a352b --- /dev/null +++ b/src/Nodes/DOMNode.php @@ -0,0 +1,14 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +/** + * Class DOMNode + * + * @method getAttribute($attribute) + * @package andreskrey\Readability\Nodes + */ +class DOMNode extends \DOMNode +{ + use NodeTrait; +} diff --git a/src/Nodes/DOMNotation.php b/src/Nodes/DOMNotation.php new file mode 100644 index 0000000..a4802e0 --- /dev/null +++ b/src/Nodes/DOMNotation.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMNotation extends \DOMNotation +{ + use NodeTrait; +} diff --git a/src/NodeClass/DOMProcessingInstruction.php b/src/Nodes/DOMProcessingInstruction.php index 0c615c6..bd80997 100644 --- a/src/NodeClass/DOMProcessingInstruction.php +++ b/src/Nodes/DOMProcessingInstruction.php @@ -1,8 +1,8 @@ <?php -namespace andreskrey\Readability\NodeClass; +namespace andreskrey\Readability\Nodes; class DOMProcessingInstruction extends \DOMProcessingInstruction { - use NodeClassTrait; + use NodeTrait; } diff --git a/src/Nodes/DOMText.php b/src/Nodes/DOMText.php new file mode 100644 index 0000000..43d2ba9 --- /dev/null +++ b/src/Nodes/DOMText.php @@ -0,0 +1,8 @@ +<?php + +namespace andreskrey\Readability\Nodes; + +class DOMText extends \DOMText +{ + use NodeTrait; +} diff --git a/src/NodeClass/NodeClassTrait.php b/src/Nodes/NodeTrait.php index a1382d1..3294612 100644 --- a/src/NodeClass/NodeClassTrait.php +++ b/src/Nodes/NodeTrait.php @@ -1,10 +1,8 @@ <?php -namespace andreskrey\Readability\NodeClass; +namespace andreskrey\Readability\Nodes; -use andreskrey\Readability\NodeUtility; - -trait NodeClassTrait +trait NodeTrait { /** * Content score of the node. Used to determine the value of the content diff --git a/src/NodeUtility.php b/src/Nodes/NodeUtility.php index d0796dd..f35e9c5 100644 --- a/src/NodeUtility.php +++ b/src/Nodes/NodeUtility.php @@ -1,10 +1,6 @@ <?php -namespace andreskrey\Readability; - -use andreskrey\Readability\NodeClass\DOMDocument; -use andreskrey\Readability\NodeClass\DOMElement; -use andreskrey\Readability\NodeClass\DOMNode; +namespace andreskrey\Readability\Nodes; /** * Class NodeUtility |