aboutsummaryrefslogtreecommitdiffstats
path: root/include/Import/Importer.php
diff options
context:
space:
mode:
authorhabeascodice <habeascodice@federated.social>2014-11-13 13:30:29 -0800
committerhabeascodice <habeascodice@federated.social>2014-11-13 13:30:29 -0800
commit2dbecf95454993cdf4996d2d65463d7759cd479b (patch)
treecbef39a4779efed1c0ab3b61a9ff09e37fadb49e /include/Import/Importer.php
parentbc02b933727da7a000d43d2d7d495f066616dc81 (diff)
parentac27db22c18ee7a82a52cbadb3efe2760b910499 (diff)
downloadvolse-hubzilla-2dbecf95454993cdf4996d2d65463d7759cd479b.tar.gz
volse-hubzilla-2dbecf95454993cdf4996d2d65463d7759cd479b.tar.bz2
volse-hubzilla-2dbecf95454993cdf4996d2d65463d7759cd479b.zip
Merge branch 'master' of https://github.com/habeascodice/red
Diffstat (limited to 'include/Import/Importer.php')
-rw-r--r--include/Import/Importer.php94
1 files changed, 94 insertions, 0 deletions
diff --git a/include/Import/Importer.php b/include/Import/Importer.php
new file mode 100644
index 000000000..c42344236
--- /dev/null
+++ b/include/Import/Importer.php
@@ -0,0 +1,94 @@
+<?php /** @file */
+
+namespace Redmatrix\Import;
+
+
+class Import {
+
+ $credentials = null;
+ $itemlist = null;
+ $src_items = null;
+
+ $items = null;
+
+ function get_credentials() {
+
+ }
+
+ function get_itemlist() {
+
+
+ }
+
+
+ function get_item_ident($item) {
+
+ }
+
+ function get_item($item_ident) {
+
+ }
+
+ function get_taxonomy($item_ident) {
+
+ }
+
+ function get_children($item_ident) {
+
+ }
+
+ function convert_item($item_ident) {
+
+ }
+
+ function convert_taxonomy($item_ident) {
+
+
+ }
+
+ function convert_child($child) {
+
+ }
+
+ function store($item,$update = false) {
+
+ }
+
+ function run() {
+
+ $this->credentials = $this->get_credentials();
+ $this->itemlist = $this->get_itemlist();
+ if($this->itemlist) {
+ $this->src_items = array();
+ $this->items = array();
+ $cnt = 0;
+ foreach($this->itemlist as $item) {
+ $ident = $item->get_item_ident($item);
+ $this->src_items[$ident]['item'] = $this->get_item($ident);
+ $this->src_items[$ident]['taxonomy'] = $this->get_taxonomy($ident);
+ $this->src_items[$ident]['children'] = $this->get_children($ident);
+ $this->items[$cnt]['item'] = $this->convert_item($ident);
+ $this->items[$cnt]['item']['term'] = $this->convert_taxonomy($ident);
+ if($this->src_items[$ident]['children']) {
+ $this->items[$cnt]['children'] = array();
+ foreach($this->src_items[$ident]['children'] as $child) {
+ $this[$cnt]['children'][] = $this->convert_child($child);
+ }
+ }
+ $cnt ++;
+ }
+
+
+
+
+ }
+
+
+
+
+
+
+ }
+
+
+} \ No newline at end of file