public function getBannerProtocol($rows, $nType = 0) { $arrProtocol = array(); foreach ($rows as $row) { $banner = new BannerProtocol(); $banner->setProtocol($row, $nType); $banner->setType($nType); if ($this->_bSceneWallpaer) { $banner->setSubType(1); } array_push($arrProtocol, $banner); } return $arrProtocol; }