From 1653533c670b956f6047cad19b9d32b4c8b3dcef Mon Sep 17 00:00:00 2001 From: Alex Barth <alex_b@53995.no-reply.drupal.org> Date: Wed, 16 Sep 2009 22:08:48 +0000 Subject: [PATCH] Add CSV parser, remove getName and getDescription methods from parsers. --- feeds.module | 5 +++++ plugins/FeedsCSVParser.inc | 19 +++++++++++++++++++ plugins/FeedsSyndicationParser.inc | 8 -------- 3 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 plugins/FeedsCSVParser.inc diff --git a/feeds.module b/feeds.module index caef6344..ec6f42d6 100644 --- a/feeds.module +++ b/feeds.module @@ -43,6 +43,11 @@ function feeds_feeds_plugin() { 'file' => drupal_get_path('module', 'feeds') .'/plugins/FeedsHttpFetcher.inc', 'parent' => 'FeedsFetcher', ), + 'FeedsCSVParser' => array( + 'name' => t('CSV parser'), + 'file' => drupal_get_path('module', 'feeds') .'/plugins/FeedsCSVParser.inc', + 'parent' => 'FeedsParser', + ), 'FeedsSyndicationParser' => array( 'name' => t('Common syndication parser'), 'file' => drupal_get_path('module', 'feeds') .'/plugins/FeedsSyndicationParser.inc', diff --git a/plugins/FeedsCSVParser.inc b/plugins/FeedsCSVParser.inc new file mode 100644 index 00000000..28fbc6d9 --- /dev/null +++ b/plugins/FeedsCSVParser.inc @@ -0,0 +1,19 @@ +<?php +// $Id$ + +class FeedsCSVParser extends FeedsParser { + + /** + * Parses a raw string and returns a Feed object from it. + */ + public function parse($raw) { + + } + + /** + * Return mapping sources. + */ + public function getMappingSources() { + return array(); + } +} \ No newline at end of file diff --git a/plugins/FeedsSyndicationParser.inc b/plugins/FeedsSyndicationParser.inc index 62ac0591..b7a6ecd9 100644 --- a/plugins/FeedsSyndicationParser.inc +++ b/plugins/FeedsSyndicationParser.inc @@ -3,14 +3,6 @@ class FeedsSyndicationParser extends FeedsParser { - public static function getName() { - return t('Syndication Parser'); - } - - public static function getDescription() { - return t('Parses RSS and Atom feeds.'); - } - /** * Parses a raw string and returns a Feed object from it. */ -- GitLab