summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Barth2010-09-08 02:43:16 (GMT)
committer Alex Barth2010-09-08 02:43:16 (GMT)
commit7ecebc728bbc4ae3d421f8bf088ecbeab16c9a6f (patch)
tree25ec5d132ec28309ac19ff4ced8398b3e49620ec
parentad927e9ede0cff42a81b8b39e37eb685916c9aaf (diff)
Move FeedsTermElement up to the parser level.
-rw-r--r--mappers/taxonomy.inc12
-rw-r--r--plugins/FeedsParser.inc17
2 files changed, 17 insertions, 12 deletions
diff --git a/mappers/taxonomy.inc b/mappers/taxonomy.inc
index 2caf5fe..6cc2f80 100644
--- a/mappers/taxonomy.inc
+++ b/mappers/taxonomy.inc
@@ -7,18 +7,6 @@
*/
/**
- * Encapsulates a taxonomy style term object.
- */
-class FeedsTermElement extends FeedsElement {
- public $tid, $vid;
- public function __construct($term) {
- parent::__construct($term->name);
- $this->tid = $term->tid;
- $this->vid = $term->vid;
- }
-}
-
-/**
* Implementation of hook_feeds_parser_sources_alter().
*/
function taxonomy_feeds_parser_sources_alter(&$sources, $content_type) {
diff --git a/plugins/FeedsParser.inc b/plugins/FeedsParser.inc
index 2c2dc51..a32c1a4 100644
--- a/plugins/FeedsParser.inc
+++ b/plugins/FeedsParser.inc
@@ -134,6 +134,23 @@ class FeedsElement {
}
/**
+ * Encapsulates a taxonomy style term object.
+ */
+class FeedsTermElement extends FeedsElement {
+ public $tid, $vid;
+
+ /**
+ * @param $term
+ * A stdClass object that is a Drupal taxonomy term.
+ */
+ public function __construct($term) {
+ parent::__construct($term->name);
+ $this->tid = $term->tid;
+ $this->vid = $term->vid;
+ }
+}
+
+/**
* Enclosure element, can be part of the result array.
*/
class FeedsEnclosure extends FeedsElement {