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


PHP L::LoadClass方法代码示例

本文整理汇总了PHP中L::LoadClass方法的典型用法代码示例。如果您正苦于以下问题:PHP L::LoadClass方法的具体用法?PHP L::LoadClass怎么用?PHP L::LoadClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在L的用法示例。


在下文中一共展示了L::LoadClass方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Promptmsg

/**
 * 默认添加数据
 */
if ($action == 'custom') {
    if (!file_exists(D_P . 'data/sql_config.php')) {
        Promptmsg('config_noexists', 'database');
    } else {
        $db = pwNewDBForInstall();
    }
    require R_P . 'lang/step/updatead.php';
    require R_P . 'lang/step/topic.php';
    require R_P . 'lang/step/pcfield.php';
    require R_P . 'lang/step/nav.php';
    require R_P . 'lang/step/pw_areas.php';
    require R_P . 'lang/step/pw_school.php';
    $areaService = L::LoadClass('areasservice', 'utility');
    $areaService->setAreaCache();
    list($prev, $next) = getStepto($action);
    pwHeader("{$basename}?action={$next}");
    exit;
}
/**
 * 生成站点各种信息,添加默认风格,更新缓存
 */
if ($action == 'other') {
    if (!file_exists(D_P . 'data/sql_config.php')) {
        Promptmsg('config_noexists', 'database');
    } else {
        $db = pwNewDBForInstall();
    }
    $writeinto = str_pad('<?php die;?>', 96) . "\r\n";
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:install.php

示例2: addTopics

 /**
  * 添加话题
  * @param array $topics 新鲜事中包含的话题
  * @param int mid 新鲜事id
  * @return int
  * @access public
  */
 function addTopics($topics, $mid)
 {
     if (!$topics || !is_array($topics) || !$mid) {
         return false;
     }
     $topicService = L::LoadClass('topic', 'sns');
     /* @var $topicService PW_Topic */
     $array = $topicService->addTopic($topics);
     if ($array) {
         //添加topic 与weibo 关系
         foreach ($array as $v) {
             $topicService->addTopicRelations($v, $mid);
         }
     }
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:22,代码来源:weibo.class.php

示例3: array

$weiboCount = $weiboService->getUserAttentionWeibosCount($winduid, array());
$weiboCount > WEIBO_RELATION_NUM && $weiboService->deleteAttentionRelation($winduid, $weiboCount);
$o_weibopost == '0' && ($weiboLiveList = $weiboService->getWeiboLives(21));
//新鲜事直播
$weiboCount > WEIBO_RELATION_NUM && ($weiboCount = WEIBO_RELATION_NUM);
$pages = numofpage($weiboCount, 1, ceil($weiboCount / 20), 'apps.php?q=weibo&do=attention&', 10, 'weiboList.filterWeibo');
if (!$db_toolbar) {
    $pwForumList = array();
    //* include_once pwCache::getPath(D_P.'data/bbscache/forumlist_cache.php');
    pwCache::getData(D_P . 'data/bbscache/forumlist_cache.php');
    if ($pwForumAllList && $GLOBALS['groupid'] == 3) {
        $pwForumList = array_merge($pwForumList, $pwForumAllList);
    }
}
//热门话题
$topicService = L::LoadClass('topic', 'sns');
/* @var $topicService PW_Topic */
$weiboHotTopics = $topicService->getWeiboHotTopics();
$topicHot = array();
$n = 0;
foreach ($weiboHotTopics as $key => $topic) {
    if (++$n > 6) {
        break;
    }
    $topic['urlTopic'] = urlencode($topic['topicname']);
    $topicHot[$key] = $topic;
}
(empty($winddb['honor']) || !$_G['allowhonor']) && ($winddb['honor'] = getLangInfo('other', 'whattosay'));
//任务
if ($db_job_isopen) {
    $isApplyJob = false;
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:home.php

示例4: exit

<?php

!defined('P_W') && exit('Forbidden');
define('AJAX', '1');
S::gp(array('type', 'areaid'), 2);
S::gp(array('job', 'sid'));
if (empty($job)) {
    $jsFile = D_P . 'data/bbscache/areadata.js';
    if (!file_exists($jsFile)) {
        $areaService = L::LoadClass('areasservice', 'utility');
        $areaService->setAreaCache();
    }
    require_once PrintEot('ajax');
    footer();
} elseif ($job == 'getschools') {
    $schoolService = L::LoadClass('schoolservice', 'user');
    $schools = $schoolService->getByAreaAndType($areaid, $type);
    echo pwJsonEncode($schools);
    ajax_footer();
} elseif ($job == 'deleducation') {
    S::gp(array('educationid'));
    $educationid = (int) $educationid;
    if ($educationid < 1) {
        echo "error\t数据错误";
        ajax_footer();
        exit;
    }
    $educationService = L::loadClass('EducationService', 'user');
    $educationItemInfo = $educationService->getEducationById($educationid);
    if (!S::isArray($educationItemInfo) || $educationItemInfo['uid'] != $winduid) {
        echo "error\t非法操作";
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:pwschools.php

示例5: buildArea

    function buildArea()
    {
        static $areaService;
        !$areaService && ($areaService = L::LoadClass('AreasService', 'utility'));
        //$id = md5(microtime());
        $id = $this->fieldInfo['fieldname'];
        if (!S::isArray($this->defaultValue)) {
            $basicValue = !S::isArray($this->fieldInfo['options']) ? array(array('parentid' => 0, 'selectid' => 'province_' . $id, 'defaultid' => '', 'hasfirst' => 1), array('parentid' => -1, 'selectid' => 'city_' . $id, 'defaultid' => '', 'hasfirst' => 1), array('parentid' => -1, 'selectid' => 'area_' . $id, 'defaultid' => '', 'hasfirst' => 1)) : array(array('parentid' => 0, 'selectid' => 'province_' . $id, 'defaultid' => intval($this->fieldInfo['options']['province']), 'hasfirst' => 1), array('parentid' => intval($this->fieldInfo['options']['province']), 'selectid' => 'city_' . $id, 'defaultid' => intval($this->fieldInfo['options']['city']), 'hasfirst' => 1), array('parentid' => intval($this->fieldInfo['options']['city']), 'selectid' => 'area_' . $id, 'defaultid' => intval($this->fieldInfo['options']['area']), 'hasfirst' => 1));
        } else {
            $basicValue = array(array('parentid' => 0, 'selectid' => 'province_' . $id, 'defaultid' => intval($this->defaultValue['province']), 'hasfirst' => 1), array('parentid' => $this->defaultValue['province'], 'selectid' => 'city_' . $id, 'defaultid' => intval($this->defaultValue['city']), 'hasfirst' => 1), array('parentid' => $this->defaultValue['city'], 'selectid' => 'area_' . $id, 'defaultid' => intval($this->defaultValue['area']), 'hasfirst' => 1));
        }
        $this->fieldInfo['html_areascripts'] = $areaService->buildAllAreasLists($basicValue);
        if (!$this->loadedScripts['area']) {
            $this->fieldInfo['html_areascripts'] .= <<<EOT
\t<script src="js/pw_areas.js"></script>
EOT;
            $this->loadedScripts['area'] = true;
        }
        $this->fieldInfo['html_areaprovince'] = <<<EOT
\t\t\t<select id="province_{$id}" {$this->disabledHtml} onchange="changeSubArea(this.value, 'city_{$id}',0,true);" class="w" style="width:70px;"></select>
EOT;
        $this->fieldInfo['html_areacity'] = <<<EOT
\t\t\t<select id="city_{$id}" {$this->disabledHtml} onchange="changeSubArea(this.value, 'area_{$id}',0,true);" class="w" style="width:70px;">
\t\t\t</select>
EOT;
        $this->fieldInfo['html_areaarea'] = <<<EOT
\t\t\t<select id="area_{$id}" {$this->disabledHtml} name="{$this->fieldInfo[fieldname]}" class="w" style="width:70px;">
\t\t\t</select>
EOT;
    }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:30,代码来源:customerfieldtemplate.class.php


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