1 | <?php |
||
32 | abstract class AbstractAttributeExportObserver extends AbstractAttributeImportObserver |
||
33 | { |
||
34 | |||
35 | /** |
||
36 | * Return's the artefact type used for export. |
||
37 | * |
||
38 | * @return string The artefact type |
||
39 | */ |
||
40 | abstract protected function getArtefactType(); |
||
41 | |||
42 | /** |
||
43 | * Create's and return's a new empty artefact entity. |
||
44 | * |
||
45 | * @param array $columns The array with the column data |
||
46 | * @param array $originalColumnNames The array with a mapping from the old to the new column names |
||
47 | * |
||
48 | * @return array The new artefact entity |
||
49 | */ |
||
50 | protected function newArtefact(array $columns, array $originalColumnNames) |
||
54 | |||
55 | /** |
||
56 | * Add the passed product type artefacts to the product with the |
||
57 | * last entity ID. |
||
58 | * |
||
59 | * @param array $artefacts The product type artefacts |
||
60 | * |
||
61 | * @return void |
||
62 | * @uses \TechDivision\Import\Product\Bundle\Subjects\BunchSubject::getLastEntityId() |
||
63 | */ |
||
64 | protected function addArtefacts(array $artefacts) |
||
68 | |||
69 | /** |
||
70 | * Return the artefacts for the passed type and entity ID. |
||
71 | * |
||
72 | * @param string $type The artefact type, e. g. configurable |
||
73 | * @param string $entityId The entity ID to return the artefacts for |
||
74 | * |
||
75 | * @return array The array with the artefacts |
||
76 | * @throws \Exception Is thrown, if no artefacts are available |
||
77 | */ |
||
78 | protected function getArtefactsByTypeAndEntityId($type, $entityId) |
||
82 | } |
||
83 |