本文整理汇总了PHP中C::loadClass方法的典型用法代码示例。如果您正苦于以下问题:PHP C::loadClass方法的具体用法?PHP C::loadClass怎么用?PHP C::loadClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C
的用法示例。
在下文中一共展示了C::loadClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _loadColumnService
function _loadColumnService()
{
return C::loadClass('columnservice');
}
示例2: __construct
function __construct()
{
$this->_error = C::loadClass('error');
}
示例3: _getData
/**
* 根据类型获得栏目数据
* @param string $type
* @param int $columnid
* @param int $num
*/
function _getData($columnid, $num)
{
$columnService = C::loadClass('columnservice');
return $columnService->getSubColumnsById($columnid, $num);
}
示例4: sourceFactory
/**
* @param string $sourceType
* @return Object
*/
function sourceFactory($sourceType)
{
$sourceTypeConfig = $this->getSourceTypeConfig();
if (isset($sourceTypeConfig[$sourceType])) {
$className = $sourceType . 'sourcetype';
return C::loadClass($className, 'sourcetype');
}
return C::loadClass('nonesourcetype', 'sourcetype');
}
示例5: _getDatanalyseServiceByType
/**
* @param string $type
* @return Object
*/
function _getDatanalyseServiceByType($type)
{
$type = $this->_filterType($type);
return C::loadClass(strtolower($type) . 'analyse', 'datanalyse/datanalyse');
}
示例6: elseif
} elseif ($action == 'edit') {
S::gp(array('id', 'page'));
$articleModule = $articleService->getArticleModule($id);
$userid = $articleModule->userId;
if (!checkEditPurview($windid, $articleModule->columnId) && $userid != $winduid) {
Showmsg('你没有权限编辑本栏目的文章');
}
if (!$step) {
if (!$page) {
$page = 1;
}
if (!is_object($articleModule)) {
Showmsg('文章不存在');
}
$pagePosition = getPosition($articleModule->columnId, '', '', $cms_sitename);
$columnService = C::loadClass('columnservice');
/* @var $columnService PW_columnService */
$columns = $columnService->getAllOrderColumns(0, $windid);
$attach = initAttach($articleModule->attach);
$postdate = get_date($articleModule->postDate);
$atc_content = $articleModule->getPageContent($page);
$articleModule->showError();
$pages = $articleModule->getPages($page, CMS_BASEURL . 'q=post&action=edit&id=' . $id . '&');
list($attachAllow, $imageAllow) = initFileTypeInfo($db_uploadfiletype);
require_once M_P . 'require/header.php';
} else {
S::gp(array('cms_subject', 'atc_content', 'cms_descrip'), 'P', 0);
S::gp(array('cms_sourcetype', 'cms_sourceid', 'cid', 'cms_jumpurl', 'cms_author', 'cms_frominfo', 'cms_fromurl', 'cms_relate', 'flashatt', 'oldatt_desc', 'addnewpage', 'cms_timelimit'));
$cms_timelimit = $cms_timelimit && (isGM($windid) || checkEditPurview($windid)) ? PwStrtoTime($cms_timelimit) : $timestamp;
$cms_jumpurl = $cms_jumpurl && (isGM($windid) || checkEditPurview($windid)) ? $cms_jumpurl : '';
PostCheck();
示例7: loadDB
/**
* 加载db类
* @param $className
*/
function loadDB($dbName, $dir = '')
{
parent::_loadBaseDB();
return C::loadClass($dbName . 'DB', parent::_formatDir($dir) . 'db');
}
示例8: exit
<?php
!defined('P_W') && exit('Forbidden');
C::loadClass('sourcetype', 'base', false);
class PW_NoneSourceType extends PW_SourceType
{
function getSourceData($sourceId)
{
return array();
}
function getSourceUrl($sourceId)
{
return '';
}
function getSourceType()
{
return '';
}
}
示例9: Showmsg
Showmsg('undefined_action');
}
$cmscommentreplyservice = C::loadClass('cmscommentreplyservice');
$replyList = $cmscommentreplyservice->getCommentsByCommentid($commentid);
require_once PrintEot('cmsreply');
ajax_footer();
}
if ($type == 'delreply') {
S::gp(array('replyid', 'commentid', 'P', 2));
if ($replyid < 1 || $commentid < 1) {
Showmsg('undefined_action');
}
$cmscomment = C::loadClass('cmscommentservice');
$data = $cmscomment->getByCommentid($commentid);
if (!$data) {
Showmsg('data_error');
}
$cmscommentreplyservice = C::loadClass('cmscommentreplyservice');
$replyData = $cmscommentreplyservice->getByReplyid($replyid);
$articleService = C::loadClass('articleservice');
$articleModule = $articleService->getArticleModule($data['article_id']);
if ($replyData['uid'] != $winduid && !checkEditPurview($windid, $articleModule->columnId)) {
Showmsg('您没有权限');
}
if (!$cmscommentreplyservice->deleteByReplyid($replyid)) {
echo "fail";
}
$cmscomment->updateReplynumByCommentid('-1', $commentid);
echo "success";
ajax_footer();
}
示例10: array_keys
$columnService = C::loadClass('columnservice');
/* @var $columnService PW_columnService */
$subColumns = $columnService->getAllOrderColumns($column);
$subColumnIds = array_keys($subColumns);
if (isGM($windid) || checkEditPurview($windid, $column)) {
$articleCount = $articleService->searchArticleCount($subColumnIds, '', '', 1);
$page = validatePage($page, $articleCount);
$articleList = $articleService->searchAtricles($subColumnIds, '', '', 1, '', '', ($page - 1) * $db_perpage, $db_perpage);
} else {
$articleCount = $articleService->searchArticleCount($subColumnIds, '', '', 1, '', $timestamp);
$page = validatePage($page, $articleCount);
$articleList = $articleService->searchAtricles($subColumnIds, '', '', 1, '', $timestamp, ($page - 1) * $db_perpage, $db_perpage);
}
$pages = numofpage($articleCount, $page, ceil($articleCount / $db_perpage), $basename . 'q=list&column=' . $column . '&');
$pageCache = L::loadClass('pagecache', 'pagecache');
$pageCacheConfig = C::loadClass('pagecacheconfiglist', 'pagecache');
$pageCache->init($pageCacheConfig);
$tmpHotArticle = $pageCache->getData('hotArticle');
$hotArticle = $articleService->filterArticles($tmpHotArticle);
list($columns, $columnInfo) = $columnService->getCurrentAndSubColumns($column);
if (!S::isArray($columns)) {
list($columns, $columnInfo) = $columnService->getCurrentAndSubColumns($columnInfo['parent_id']);
}
/* update hits */
/*$hitfile = D_P . "data/bbscache/cms_hits.txt";
$hitsize = @filesize($hitfile);
if ($hitsize && $hitsize > 1024) {
updateArticleHits();
}*/
$pagePosition = getPosition($column, '', '', $cms_sitename);
$_definedSeo = array('title' => $subColumns[$column]['seotitle'], 'metaDescription' => $subColumns[$column]['seodesc'], 'metaKeywords' => $subColumns[$column]['seokeywords']);
示例11: loadArticleService
function loadArticleService()
{
return C::loadClass('articleservice');
}
示例12: round
$winduid = $winddb['uid'];
$groupid = $winddb['groupid'];
$groupid == '-1' && ($groupid = $winddb['memberid']);
$userrvrc = round($winddb['rvrc'] / 10, 1);
$windid = $winddb['username'];
if (file_exists(D_P . "data/groupdb/group_{$groupid}.php")) {
//* require_once pwCache::getPath(S::escapePath(D_P . "data/groupdb/group_$groupid.php"));
pwCache::getData(S::escapePath(D_P . "data/groupdb/group_{$groupid}.php"));
} else {
//* require_once pwCache::getPath(D_P . "data/groupdb/group_1.php");
pwCache::getData(D_P . "data/groupdb/group_1.php");
}
}
define('FX', 1);
}
$cmsAttachService = C::loadClass('cmsattachservice');
$attach = $cmsAttachService->getAttachById($aid);
if (!$attach) {
Showmsg('job_attach_error');
}
$fgeturl = $attach['attachurl'];
$fileext = substr(strrchr($attach['attachurl'], '.'), 1);
$filesize = 0;
if (strpos($pwServer['HTTP_USER_AGENT'], 'MSIE') !== false && $fileext == 'torrent') {
$attachment = 'inline';
} else {
$attachment = 'attachment';
}
$attach['name'] = trim(str_replace(' ', ' ', $attach['name']));
if ($db_charset == 'utf-8') {
if (function_exists('mb_convert_encoding')) {
示例13: exit
<?php
!defined('M_P') && exit('Forbidden');
$USCR = 'square_weibo';
if (!$o_browseopen) {
ObHeader('u.php');
}
$act = S::getGP('act');
require_once R_P . 'u/require/core.php';
require_once R_P . 'require/showimg.php';
$thisbase = $basename;
$squareService = C::loadClass('squareservice');
require_once M_P . 'require/header.php';
switch ($act) {
case 'postlast':
$postlast = $squareService->getLastPostUser(6);
require_once PrintEot('m_browse_ajax');
ajax_footer();
break;
case 'maxfans':
$maxfans = $squareService->getFansDescUser(6);
require_once PrintEot('m_browse_ajax');
ajax_footer();
break;
case 'thread':
$threadList = $squareService->getLastThread(20);
require_once PrintEot('m_browse_ajax');
ajax_footer();
break;
case 'weibo':
$weiboList = $squareService->getWeiboLives(20);
示例14: _getDatanalyseService
function _getDatanalyseService()
{
return C::loadClass('cmsdatanalyseservice', 'datanalyse');
}
示例15: updateArticleHitsDatanalyse
function updateArticleHitsDatanalyse($aid, $cid, $num)
{
$articleService = C::loadClass('articleservice');
/* @var $articleService PW_ArticleService */
$articleService->updateArticleHits($aid);
if ((int) $num % 13 == 0) {
updateDatanalyse($aid, 'article_' . $cid, (int) $num, true);
}
}