当前位置: 首页>>代码示例>>PHP>>正文


PHP C::loadClass方法代码示例

本文整理汇总了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');
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:4,代码来源:purviewservice.class.php

示例2: __construct

 function __construct()
 {
     $this->_error = C::loadClass('error');
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:4,代码来源:module.class.php

示例3: _getData

 /**
  * 根据类型获得栏目数据
  * @param string $type
  * @param int $columnid
  * @param int $num
  */
 function _getData($columnid, $num)
 {
     $columnService = C::loadClass('columnservice');
     return $columnService->getSubColumnsById($columnid, $num);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:11,代码来源:columnsource.class.php

示例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');
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:articlemodule.class.php

示例5: _getDatanalyseServiceByType

 /**
  * @param string $type
  * @return Object
  */
 function _getDatanalyseServiceByType($type)
 {
     $type = $this->_filterType($type);
     return C::loadClass(strtolower($type) . 'analyse', 'datanalyse/datanalyse');
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:9,代码来源:cmsdatanalyseservice.class.php

示例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();
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:m_post.php

示例7: loadDB

 /**
  * 加载db类
  * @param $className
  */
 function loadDB($dbName, $dir = '')
 {
     parent::_loadBaseDB();
     return C::loadClass($dbName . 'DB', parent::_formatDir($dir) . 'db');
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:9,代码来源:core.php

示例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 '';
    }
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:19,代码来源:nonesourcetype.class.php

示例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();
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:cmsreply.php

示例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']);
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:m_list.php

示例11: loadArticleService

 function loadArticleService()
 {
     return C::loadClass('articleservice');
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:4,代码来源:columnservice.class.php

示例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('&nbsp;', ' ', $attach['name']));
if ($db_charset == 'utf-8') {
    if (function_exists('mb_convert_encoding')) {
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:m_download.php

示例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);
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:m_browse.php

示例14: _getDatanalyseService

 function _getDatanalyseService()
 {
     return C::loadClass('cmsdatanalyseservice', 'datanalyse');
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:4,代码来源:articlesource.class.php

示例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);
    }
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:9,代码来源:m_view.php


注:本文中的C::loadClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。