@@ 189-198 (lines=10) @@ | ||
186 | * @param array $fieldsMatching |
|
187 | * @param array $row |
|
188 | */ |
|
189 | private function insertDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, array $row) |
|
190 | { |
|
191 | foreach ($row as $columnName => $columnValue) { |
|
192 | if ((!in_array($columnName, ['id', 'uid']) || isset($fieldsMatching[$columnName])) && !is_null($columnValue)) { |
|
193 | $type = $fieldsMatching[$columnName]['type']; |
|
194 | $value = $this->formatValueToBeans($type, $columnValue); |
|
195 | $zohoBean->{$fieldsMatching[$columnName]['setter']}($value); |
|
196 | } |
|
197 | } |
|
198 | } |
|
199 | ||
200 | /** |
|
201 | * Insert data to bean in order to update zoho records. |
|
@@ 208-214 (lines=7) @@ | ||
205 | * @param type $columnName |
|
206 | * @param type $valueDb |
|
207 | */ |
|
208 | private function updateDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, $columnName, $valueDb) |
|
209 | { |
|
210 | if (!in_array($columnName, ['id', 'uid']) || (isset($fieldsMatching[$columnName]))) { |
|
211 | $type = $fieldsMatching[$columnName]['type']; |
|
212 | $value = is_null($valueDb) ? $valueDb : $this->formatValueToBeans($type, $valueDb); |
|
213 | $zohoBean->{$fieldsMatching[$columnName]['setter']}($value); |
|
214 | } |
|
215 | } |
|
216 | ||
217 | /** |