1 | <?php |
||
37 | class OptionSubject extends AbstractAttributeSubject implements OptionSubjectInterface, FileUploadSubjectInterface |
||
38 | { |
||
39 | |||
40 | /** |
||
41 | * The trait that provides file upload functionality. |
||
42 | * |
||
43 | * @var \TechDivision\Import\Subjects\FileUploadTrait |
||
44 | */ |
||
45 | use FileUploadTrait; |
||
46 | |||
47 | /** |
||
48 | * The ID of the option that has been created recently. |
||
49 | * |
||
50 | * @var integer |
||
51 | */ |
||
52 | protected $lastOptionId; |
||
53 | |||
54 | /** |
||
55 | * The value => option ID mapping. |
||
56 | * |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $attributeCodeValueOptionIdMapping = array(); |
||
60 | |||
61 | /** |
||
62 | * Initializes the previously loaded global data for exactly one bunch. |
||
63 | * |
||
64 | * @param string $serial The serial of the actual import |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | public function setUp($serial) |
||
92 | |||
93 | /** |
||
94 | * Map's the passed attribue code and value to the option ID that has been created recently. |
||
95 | * |
||
96 | * @param string $attributeCode The attriburte code that has to be mapped |
||
97 | * @param string $value The value that has to be mapped |
||
98 | * |
||
99 | * @return void |
||
100 | */ |
||
101 | public function addAddtributeCodeValueOptionIdMapping($attributeCode, $value) |
||
105 | |||
106 | /** |
||
107 | * Queries whether or not the attribute with the passed code/value has already been processed. |
||
108 | * |
||
109 | * @param string $attributeCode The attribute code to check |
||
110 | * @param string $value The option value to check |
||
111 | * |
||
112 | * @return boolean TRUE if the path has been processed, else FALSE |
||
113 | */ |
||
114 | public function hasBeenProcessed($attributeCode, $value) |
||
118 | |||
119 | /** |
||
120 | * Return's the ID of the attribute that has been created recently. |
||
121 | * |
||
122 | * @return integer The attribute ID |
||
123 | */ |
||
124 | public function getLastEntityId() |
||
128 | |||
129 | /** |
||
130 | * Set's the ID of the option that has been created recently. |
||
131 | * |
||
132 | * @param integer $lastOptionId The option ID |
||
133 | * |
||
134 | * @return void |
||
135 | */ |
||
136 | public function setLastOptionId($lastOptionId) |
||
140 | |||
141 | /** |
||
142 | * Return's the ID of the option that has been created recently. |
||
143 | * |
||
144 | * @return integer The option ID |
||
145 | */ |
||
146 | public function getLastOptionId() |
||
150 | |||
151 | /** |
||
152 | * Pre-load the option ID for the passed EAV attribute option. |
||
153 | * |
||
154 | * @param array $attributeOption The EAV attribute option with the ID that has to be pre-loaded |
||
155 | * |
||
156 | * @return void |
||
157 | */ |
||
158 | public function preLoadOptionId(array $attributeOption) |
||
162 | } |
||
163 |