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


PHP C::loadDB方法代碼示例

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


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

示例1: _getDataByTags

 /**
  * 根據日誌ID數組獲得日誌信息
  * @return array
  */
 function _getDataByTags()
 {
     if (empty($this->tags)) {
         return array();
     }
     $articleDB = C::loadDB('article');
     /* @var $articleDB PW_ArticleDB */
     return $articleDB->getArticlesByIds($this->tags);
 }
開發者ID:jechiy,項目名稱:PHPWind,代碼行數:13,代碼來源:articleanalyse.class.php

示例2: init

 function init($id)
 {
     $this->_cid = $id;
     require_once R_P . 'mode/cms/require/core.php';
     $articleDB = C::loadDB('article');
     $article = $articleDB->get($this->_cid);
     empty($article) && Showmsg('data_error');
     $this->_url = $this->_url . "&id=" . $this->_cid;
     $title = $content = '我發現了一篇文章' . sprintf("[url=%s] %s [/url]", urlRewrite($this->_url), $article['subject']) . ',特別推薦。';
     $descrip = $article['descrip'];
     $mailSubject = getLangInfo('app', 'cms_recommend');
     $mailContent = getLangInfo('app', 'ajax_sendweibo_cmsinfo', array('title' => $title, 'descrip' => $descrip));
     $this->_content = $content;
     $this->_mailSubject = $mailSubject;
     $this->_mailContent = $mailContent;
 }
開發者ID:jechiy,項目名稱:PHPWind,代碼行數:16,代碼來源:cms.weibo.php

示例3: _loadPurviewDAO

 function _loadPurviewDAO()
 {
     return C::loadDB('purview');
 }
開發者ID:jechiy,項目名稱:PHPWind,代碼行數:4,代碼來源:purviewservice.class.php

示例4: getCmsColumnDao

 /**
  * 文章欄目表DAO
  * @return unknown_type
  */
 function getCmsColumnDao()
 {
     static $sCmsColumnDao;
     if (!$sCmsColumnDao) {
         require_once R_P . 'mode/cms/require/core.php';
         $sCmsColumnDao = C::loadDB('Column');
     }
     return $sCmsColumnDao;
 }
開發者ID:sherlockhouse,項目名稱:aliyun,代碼行數:13,代碼來源:cmssearcher.extend.php

示例5: list

     $colony = $newColony->getColonyById($active['cid']);
     if ($active['poster']) {
         list($poster) = geturl("{$active['poster']}", 'lf');
     } else {
         $poster = $imgpath . '/defaultactive.jpg';
     }
     $collection['uid'] = $active['uid'];
     $collection['link'] = $db_bbsurl . '/apps.php?q=group&a=active&job=view&cyid=' . $colony['id'] . '&id=' . $active['id'];
     $collection['active']['type'] = $type;
     $collection['active']['name'] = $active['title'];
     $collection['active']['image'] = $poster;
     $type = 'active';
 } elseif ($type == 'cms') {
     define('M_P', 1);
     require_once R_P . 'mode/cms/require/core.php';
     $articleDB = C::loadDB('article');
     $article = $articleDB->get($id);
     empty($article) && Showmsg('data_error');
     $collection['uid'] = $article['userid'];
     $collection['link'] = $db_bbsurl . '/mode.php?m=cms&q=view&id=' . $id;
     $collection['cms']['subject'] = $article['subject'];
 } elseif ($type == 'postfavor') {
     //* $threadsService = L::loadClass('Threads' , 'forum'); /* @var $diaryService PW_Diary */
     //* $favor 	= $threadsService->getThreads($id);
     $_cacheService = Perf::gatherCache('pw_threads');
     $favor = $_cacheService->getThreadByThreadId($id);
     empty($favor) && Showmsg('data_error');
     $collection['uid'] = $favor['authorid'];
     $collection['lastpost'] = $favor['lastpost'];
     $collection['link'] = $db_bbsurl . '/read.php?tid=' . $id;
     $collection['postfavor']['subject'] = $favor['subject'];
開發者ID:sherlockhouse,項目名稱:aliyun,代碼行數:31,代碼來源:ajax.php

示例6: loadColumnDB

 function loadColumnDB()
 {
     return C::loadDB($this->_module_name);
 }
開發者ID:jechiy,項目名稱:PHPWind,代碼行數:4,代碼來源:columnservice.class.php

示例7: _getCmsCommentDB

 /**
  *加載dao
  * 
  * @return PW_CmsCommentDB
  */
 function _getCmsCommentDB()
 {
     return C::loadDB('CmsComment');
 }
開發者ID:jechiy,項目名稱:PHPWind,代碼行數:9,代碼來源:cmscommentservice.class.php

示例8: _getArticleExtendDAO

 function _getArticleExtendDAO()
 {
     return C::loadDB('articleextend');
 }
開發者ID:sherlockhouse,項目名稱:aliyun,代碼行數:4,代碼來源:articleservice.class.php

示例9: _getCmsCommentReplyDB

 /**
  *加載dao
  * 
  * @return PW_CmsCommentDB
  */
 function _getCmsCommentReplyDB()
 {
     return C::loadDB('CmsCommentReply');
 }
開發者ID:jechiy,項目名稱:PHPWind,代碼行數:9,代碼來源:cmscommentreplyservice.class.php

示例10: _getCmsAttachDAO

 function _getCmsAttachDAO()
 {
     return C::loadDB('cmsattach');
 }
開發者ID:jechiy,項目名稱:PHPWind,代碼行數:4,代碼來源:cmsattachservice.class.php


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