本文整理汇总了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);
}
示例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;
}
示例3: _loadPurviewDAO
function _loadPurviewDAO()
{
return C::loadDB('purview');
}
示例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;
}
示例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'];
示例6: loadColumnDB
function loadColumnDB()
{
return C::loadDB($this->_module_name);
}
示例7: _getCmsCommentDB
/**
*加载dao
*
* @return PW_CmsCommentDB
*/
function _getCmsCommentDB()
{
return C::loadDB('CmsComment');
}
示例8: _getArticleExtendDAO
function _getArticleExtendDAO()
{
return C::loadDB('articleextend');
}
示例9: _getCmsCommentReplyDB
/**
*加载dao
*
* @return PW_CmsCommentDB
*/
function _getCmsCommentReplyDB()
{
return C::loadDB('CmsCommentReply');
}
示例10: _getCmsAttachDAO
function _getCmsAttachDAO()
{
return C::loadDB('cmsattach');
}