@@ 143-152 (lines=10) @@ | ||
140 | * @param array $fieldsMatching |
|
141 | * @param array $row |
|
142 | */ |
|
143 | private function insertDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, array $row) |
|
144 | { |
|
145 | foreach ($row as $columnName => $columnValue) { |
|
146 | if ((!in_array($columnName, ['id', 'uid']) || isset($fieldsMatching[$columnName])) && !is_null($columnValue)) { |
|
147 | $type = $fieldsMatching[$columnName]['type']; |
|
148 | $value = $this->formatValueToBeans($type, $columnValue); |
|
149 | $zohoBean->{$fieldsMatching[$columnName]['setter']}($value); |
|
150 | } |
|
151 | } |
|
152 | } |
|
153 | ||
154 | /** |
|
155 | * Insert data to bean in order to update zoho records. |
|
@@ 162-168 (lines=7) @@ | ||
159 | * @param type $columnName |
|
160 | * @param type $valueDb |
|
161 | */ |
|
162 | private function updateDataZohoBean(ZohoBeanInterface $zohoBean, array $fieldsMatching, $columnName, $valueDb) |
|
163 | { |
|
164 | if (!in_array($columnName, ['id', 'uid']) || (isset($fieldsMatching[$columnName]))) { |
|
165 | $type = $fieldsMatching[$columnName]['type']; |
|
166 | $value = is_null($valueDb) ? $valueDb : $this->formatValueToBeans($type, $valueDb); |
|
167 | $zohoBean->{$fieldsMatching[$columnName]['setter']}($value); |
|
168 | } |
|
169 | } |
|
170 | ||
171 | /** |