aboutsummaryrefslogtreecommitdiffstats
path: root/include/Import/Importer.php
blob: c42344236aa3db1b08d69530c509cae36a20e5b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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 ++;
			}




		}






	}


}