/** * @param ImportRowProcess $item * @return bool|mixed|null */ protected function searchEntity(ImportRowProcess $item) { $rowKey = $item->getRowKey(); if (!isset($this->entityKeyByRowKey[md5($rowKey)])) { return false; } return $this->entityCollection->get($this->entityKeyByRowKey[md5($rowKey)]); }
/** * @return array */ public function getConvertedData() { $valuesString = $this->responseData->getRowValues(); if (!$valuesString) { $this->setConvertedData(array()); return parent::getConvertedData(); } $values = unserialize($valuesString); if (!$values) { $this->setConvertedData(array()); return parent::getConvertedData(); } $this->setConvertedData(array('views' => $values[1], 'uniqueViews' => $values[2])); return parent::getConvertedData(); }
/** * @param $index * @param $rowKey * @param $valuesString * @return ImportRowProcess */ protected function setImportRowProcess($index, $rowKey, $valuesString) { $row = new ImportRowProcess(); $row->setRowIndex($index); $row->setRowKey($rowKey); $row->setRowValues($valuesString); return $row; }