From 0c11d557755ddbbafeeccd71e2d70b5c1d1458ab Mon Sep 17 00:00:00 2001 From: Andres Rey Date: Fri, 21 Oct 2016 20:20:48 +0100 Subject: Major refactor, Readability now is an extension of Element. --- src/ReadabilityInterface.php | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'src/ReadabilityInterface.php') diff --git a/src/ReadabilityInterface.php b/src/ReadabilityInterface.php index e5ae9dd..7cb8110 100644 --- a/src/ReadabilityInterface.php +++ b/src/ReadabilityInterface.php @@ -2,12 +2,31 @@ namespace andreskrey\Readability; -interface ReadabilityInterface +use League\HTMLToMarkdown\ElementInterface; + +interface ReadabilityInterface extends ElementInterface { /** - * @param DOMElement $node + * @param string $value + * + * @return bool + */ + public function tagNameEqualsTo($value); + + /** + * @return bool */ - public function __construct($node); + public function hasSinglePNode(); + + /** + * @return int + */ + public function getNodeAncestors(); + + /** + * @return Readability|null + */ + public function getAllLinks(); /** * @return int @@ -30,9 +49,4 @@ interface ReadabilityInterface * @return int */ public function setContentScore($score); - - /** - * @return DOMElement|null - */ - public function getAllLinks(); } -- cgit v1.2.3