From bab2fb3899cc243e2f67ccf787f3657b250f6e61 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 2 Feb 2018 15:39:47 -0800 Subject: Remove dependency on PicoFeed --- .../PicoFeed/Serialization/SubscriptionParser.php | 142 --------------------- 1 file changed, 142 deletions(-) delete mode 100644 vendor/miniflux/picofeed/lib/PicoFeed/Serialization/SubscriptionParser.php (limited to 'vendor/miniflux/picofeed/lib/PicoFeed/Serialization/SubscriptionParser.php') diff --git a/vendor/miniflux/picofeed/lib/PicoFeed/Serialization/SubscriptionParser.php b/vendor/miniflux/picofeed/lib/PicoFeed/Serialization/SubscriptionParser.php deleted file mode 100644 index caff07c2..00000000 --- a/vendor/miniflux/picofeed/lib/PicoFeed/Serialization/SubscriptionParser.php +++ /dev/null @@ -1,142 +0,0 @@ -parentElement = $parentElement; - $this->outlineElement = $outlineElement; - $this->subscription = new Subscription(); - } - - /** - * Get object instance - * - * @static - * @access public - * @param SimpleXMLElement $parentElement - * @param SimpleXMLElement $outlineElement - * @return SubscriptionParser - */ - public static function create(SimpleXMLElement $parentElement, SimpleXMLElement $outlineElement) - { - return new static($parentElement, $outlineElement); - } - - /** - * Parse subscription entry - * - * @access public - * @return Subscription - */ - public function parse() - { - $this->subscription->setCategory($this->findCategory()); - $this->subscription->setTitle($this->findTitle()); - $this->subscription->setFeedUrl($this->findFeedUrl()); - $this->subscription->setSiteUrl($this->findSiteUrl()); - $this->subscription->setType($this->findType()); - $this->subscription->setDescription($this->findDescription()); - - return $this->subscription; - } - - /** - * Find category. - * - * @access protected - * @return string - */ - protected function findCategory() - { - return isset($this->parentElement['text']) ? (string) $this->parentElement['text'] : ''; - } - - /** - * Find title. - * - * @access protected - * @return string - */ - protected function findTitle() - { - return isset($this->outlineElement['title']) ? (string) $this->outlineElement['title'] : (string) $this->outlineElement['text']; - } - - /** - * Find feed url. - * - * @access protected - * @return string - */ - protected function findFeedUrl() - { - return (string) $this->outlineElement['xmlUrl']; - } - - /** - * Find site url. - * - * @access protected - * @return string - */ - protected function findSiteUrl() - { - return isset($this->outlineElement['htmlUrl']) ? (string) $this->outlineElement['htmlUrl'] : $this->findFeedUrl(); - } - - /** - * Find type. - * - * @access protected - * @return string - */ - protected function findType() - { - return isset($this->outlineElement['version']) ? (string) $this->outlineElement['version'] : - isset($this->outlineElement['type']) ? (string) $this->outlineElement['type'] : 'rss'; - } - - /** - * Find description. - * - * @access protected - * @return string - */ - protected function findDescription() - { - return isset($this->outlineElement['description']) ? (string) $this->outlineElement['description'] : $this->findTitle(); - } -} -- cgit v1.2.3