public function getDetailProtocol($rows) { try { $theme = null; $arrPrev = array(); foreach ($rows as $row) { if (!$theme) { $theme = new ThemesDetailsProtocol(); $theme->setVercode($this->_nVercode); $theme->setKernelCode($this->_nKernel); $theme->setProtocol($row, $this->_nChannel); } $prev = new PrevProtocol(); $prev->setPrev($row); if ((int) $row['prev_type'] == 1) { $strMainUrl = $prev->getMainPrev($row); } array_push($arrPrev, $prev); } $nImgNum = count($arrPrev); if ($theme) { $theme->setPrevImgs($nImgNum, $strMainUrl, $arrPrev); } return $theme; } catch (Exception $e) { Log::write("Theme::getThemeDetail() exception " . $e->getMessage(), "log"); return false; } return false; }