1 | <?php |
||
36 | class EeBunchSubject extends BunchSubject |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The row ID of the product that has been created recently. |
||
41 | * |
||
42 | * @var integer |
||
43 | */ |
||
44 | protected $lastRowId; |
||
45 | |||
46 | /** |
||
47 | * The mapping for the paths to the created row IDs. |
||
48 | * |
||
49 | * @var array |
||
50 | */ |
||
51 | protected $pathRowIdMapping = array(); |
||
52 | |||
53 | /** |
||
54 | * Intializes the previously loaded global data for exactly one bunch. |
||
55 | * |
||
56 | * @param string $serial The serial of the actual import |
||
57 | * |
||
58 | * @return void |
||
59 | */ |
||
60 | public function setUp($serial) |
||
79 | |||
80 | /** |
||
81 | * Clean up the global data after importing the variants. |
||
82 | * |
||
83 | * @param string $serial The serial of the actual import |
||
84 | * |
||
85 | * @return void |
||
86 | */ |
||
87 | public function tearDown($serial) |
||
104 | |||
105 | /** |
||
106 | * Set's the row ID of the product that has been created recently. |
||
107 | * |
||
108 | * @param string $lastRowId The row ID |
||
109 | * |
||
110 | * @return void |
||
111 | */ |
||
112 | 1 | public function setLastRowId($lastRowId) |
|
116 | |||
117 | /** |
||
118 | * Return's the row ID of the product that has been created recently. |
||
119 | * |
||
120 | * @return string The row Id |
||
121 | */ |
||
122 | 1 | public function getLastRowId() |
|
126 | |||
127 | /** |
||
128 | * Add the passed path => row ID mapping. |
||
129 | * |
||
130 | * @param string $path The path |
||
131 | * |
||
132 | * @return void |
||
133 | */ |
||
134 | public function addPathRowIdMapping($path) |
||
138 | |||
139 | /** |
||
140 | * Removes the mapping, e. g. when a category has been deleted. |
||
141 | * |
||
142 | * @param string $path The path to delete the mapping for |
||
143 | * |
||
144 | * @return void |
||
145 | */ |
||
146 | public function removePathRowIdMapping($path) |
||
150 | |||
151 | /** |
||
152 | * Return's the entity ID for the passed path. |
||
153 | * |
||
154 | * @param string $path The path to return the entity ID for |
||
155 | * |
||
156 | * @return integer The mapped entity ID |
||
157 | * @throws \Exception Is thrown, if the path can not be mapped |
||
158 | */ |
||
159 | public function mapPathRowId($path) |
||
174 | |||
175 | /** |
||
176 | * Return's the PK column name to create the product => attribute relation. |
||
177 | * |
||
178 | * @return string The PK column name |
||
179 | */ |
||
180 | protected function getPrimaryKeyMemberName() |
||
184 | } |
||
185 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.