当前位置: 首页>>代码示例>>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;未经允许,请勿转载。