1 | <?php |
||
9 | class BaseImporter implements Importer { |
||
10 | |||
11 | /** |
||
12 | * @var ImportCoordinates |
||
13 | */ |
||
14 | public $import_coordinates; |
||
15 | |||
16 | /** |
||
17 | * @var ImportLogger |
||
18 | */ |
||
19 | public $logger; |
||
20 | |||
21 | /** |
||
22 | * @var Relations |
||
23 | */ |
||
24 | public $relations; |
||
25 | |||
26 | /** |
||
27 | * BaseImporter constructor. |
||
28 | * |
||
29 | * @param ImportLogger|null $logger |
||
30 | * @param Relations|null $relations |
||
31 | */ |
||
32 | public function __construct( ImportCoordinates $import_coordinates, ImportLogger $logger = null, Relations $relations = null ) { |
||
37 | |||
38 | /** |
||
39 | * @param array $data |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | public function import( array $data ) { |
||
46 | |||
47 | /** |
||
48 | * @param ImportCoordinates $import_coordinates |
||
49 | * |
||
50 | * @return mixed |
||
51 | */ |
||
52 | public function set_import_coordinates( ImportCoordinates $import_coordinates ) { |
||
55 | |||
56 | /** |
||
57 | * @return ImportLogger |
||
58 | */ |
||
59 | public function get_logger() { |
||
62 | |||
63 | /** |
||
64 | * @return Relations |
||
65 | */ |
||
66 | public function get_relations() { |
||
69 | |||
70 | /** |
||
71 | * Returns an array of information about the importer. |
||
72 | * |
||
73 | * @return \stdClass |
||
74 | */ |
||
75 | public static function info() { |
||
78 | } |