當前位置: 首頁>>代碼示例>>PHP>>正文


PHP global_common::formatPlanText方法代碼示例

本文整理匯總了PHP中global_common::formatPlanText方法的典型用法代碼示例。如果您正苦於以下問題:PHP global_common::formatPlanText方法的具體用法?PHP global_common::formatPlanText怎麽用?PHP global_common::formatPlanText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在global_common的用法示例。


在下文中一共展示了global_common::formatPlanText方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getStoreByIDs

 public function getStoreByIDs($arrIDs)
 {
     $arrIDs = global_common::splitString($arrIDs);
     $strQueryIN = global_common::convertToQueryIN($arrIDs);
     if ($strQueryIN) {
         $strQueryIN = global_mapping::StoreID . ' IN (' . $strQueryIN . ')';
     } else {
         $strQueryIN = '1=1';
     }
     $whereClause = 'WHERE ' . $strQueryIN;
     $strSQL .= global_common::prepareQuery(global_common::SQL_SELECT_FREE, array('*', self::TBL_SL_STORE, $whereClause . ' ' . ' limit 0,' . self::NUM_PER_PAGE));
     //echo $strSQL;
     $arrResult = $this->_objConnection->selectCommand($strSQL);
     if (!$arrResult) {
         global_common::writeLog('get getProductByIDs:' . $strSQL, 1, $_mainFrame->pPage);
         return null;
     }
     $objCity = new Model_City($this->_objConnection);
     $objDistrict = new Model_District($this->_objConnection);
     $tempVarCities = $objCity->getAllCity();
     $allCities = null;
     foreach ($tempVarCities as $key => $info) {
         $allCities[$info[global_mapping::CityID]] = $info;
         unset($tempVarCities[$key]);
     }
     $tempDistricts = $objDistrict->getAllDistrict();
     $allDistricts = null;
     foreach ($tempDistricts as $key => $info) {
         $allDistricts[$info[global_mapping::DistrictID]] = $info;
         unset($tempDistricts[$key]);
     }
     // print_r($allDistricts);
     // return;
     $count = count($arrResult);
     $objArticle = new Model_Article($this->_objConnection);
     for ($i = 0; $i < $count; $i++) {
         //echo $arrResult;
         //print_r( $allCities);
         //$arrResult[$i][global_mapping::CityID] = $allCities[$arrResult[$i][global_mapping::CityID]];
         $arrResult[$i][global_mapping::CityName] = $allCities[$arrResult[$i][global_mapping::CityID]][global_mapping::CityName];
         // print_r($arrResult[$i]);
         //return;
         // print_r($allCities[$arrResult[$i][global_mapping::CityID]]);
         //break;
         $arrResult[$i][global_mapping::DistrictName] = $allDistricts[$arrResult[$i][global_mapping::DistrictID]][global_mapping::DistrictName];
         $arrResult[$i][global_mapping::Latitude] = global_common::convertToDecimal($arrResult[$i][global_mapping::Latitude]);
         $arrResult[$i][global_mapping::Longitude] = global_common::convertToDecimal($arrResult[$i][global_mapping::Longitude]);
         $arrArticle = $objArticle->getArticleByStoreID($arrResult[$i][global_mapping::StoreID]);
         $shortDescription = global_common::formatPlanText($arrArticle[0][global_mapping::Content]);
         $arrResult[$i][global_mapping::Content] = global_common::cutString2($shortDescription, 0, 16);
         // print_r($arrResult[$i]);
         //echo $arrResult[$i][global_mapping::DistrictID];
         //echo $allDistricts[$arrResult[$i][global_mapping::DistrictID]][global_mapping::DistrictName];
         //print_r($allDistricts);
         //return ;
     }
     //print_r($stores);
     return $arrResult;
 }
開發者ID:vietlethanh,項目名稱:KooKooBackEnd,代碼行數:59,代碼來源:model_store.php


注:本文中的global_common::formatPlanText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。