合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
# 学堂架构 [TOC] ## 入口 ~~~ <?php require_once dirname(__FILE__).'/protected/components/Distribute.php';//处理分发情况 date_default_timezone_set("Asia/Chongqing"); $yii=dirname(__FILE__).'/../framework/yii.php'; $app=dirname(__FILE__).'/protected/components/WeikeApplication.php'; $config=require(dirname(__FILE__).'/protected/config/main.php'); $common =require(dirname(__FILE__).'/protected/config/common.php'); $config = merge_array($config,$common) ; define('YII_DEBUG_PREFIX','_t'); $debug = $_GET[YII_DEBUG_PREFIX]=='t'; defined('YII_DEBUG') or define('YII_DEBUG',$debug); require_once($yii); require_once($app); $app = new WeikeApplication($config); $app->run(); ~~~ ## 配置 D:\wamp\www\xue.test\xuetang\protected\config\main.php D:\wamp\www\xue.test\xuetang\protected\config\common.php 用途: - 定义常量 - 配置项 ~~~ 'params'=>require(dirname(__FILE__).'/params.php'), ~~~ D:\wamp\www\xue.test\xuetang\protected\config\WK.php D:\wamp\www\xue.test\xuetang\protected\config\params.php ## 模块 ~~~ 'modules'=>array( 'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>'123456', 'ipFilters'=>array('127.0.0.1','::1'), ), 'vsapi2'=>array( 'class'=>'application.modules.vsapi2.Vsapi2Module', ), 'wsapi'=>array( 'class'=>'application.modules.wsapi.WsapiModule', ), 'desktop'=>array( 'class'=>'application.modules.desktop.DesktopModule', ), 'resource'=>array( 'class'=>'application.modules.resource.ResourceModule', ), 'wmpc'=>array( 'class'=>'application.modules.wmpc.WmpcModule', ), 'croom'=>array( 'class'=>'application.modules.croom.CroomModule', ), 'rcenter'=>array( 'class'=>'application.modules.rcenter.RcenterModule', ), 'csapi'=>array( 'class'=>'application.modules.csapi.CsapiModule', ), 'ktback'=>array( 'class'=>'application.modules.ktback.KtbackModule', ), 'xtback'=>array( 'class'=>'application.modules.xtback.XtbackModule', ), 'trace'=>array( 'class'=>'application.modules.trace.TraceModule', ), 'sapi'=>array( 'class'=>'application.modules.sapi.SapiModule', ), 'dsapi'=>array( 'class'=>'application.modules.dsapi.DsapiModule', ), 'esapi'=>array( 'class'=>'application.modules.esapi.EsapiModule', ), 'mapi'=>array( 'class'=>'application.modules.mapi.MapiModule', ), 'maoming'=>array( 'class'=>'application.modules.maoming.MaomingModule', ), //3G手机版 'mobile'=>array( 'class'=>'application.modules.mobile.MobileModule', ), //综合版个人中心 'personal'=>array( 'class'=>'application.modules.personal.PersonalModule', ), //改版资源库 'repositories'=>array( 'class'=>'application.modules.repositories.RepositoriesModule', ), //改版备课 'preparing'=>array( 'class'=>'application.modules.preparing.PreparingModule', ), //改版上课 'teaching'=>array( 'class'=>'application.modules.teaching.TeachingModule', ), //改版主题讨论 'topic'=>array( 'class'=>'application.modules.topic.TopicModule', ), 'asapi'=>array( 'class'=>'application.modules.asapi.AsapiModule', ), //学堂mini版 'cminapi'=>array( 'class'=>'application.modules.cminapi.CminapiModule', ), //学堂大考总复习API 'rvsapi'=>array( 'class'=>'application.modules.rvsapi.RvsapiModule', ), 'wechat'=>array( 'class'=>'application.modules.wechat.WechatModule', ), //学堂APP总入口 'xuetang'=>array( 'class'=>'application.modules.xuetang.XuetangModule', ), // 'v2class'=>array( 'class'=>'application.modules.v2class.V2classModule', ), //第三版教学, 备课教案 'teachingV3' => array( 'class' => 'application.modules.teachingV3.TeachingV3Module', ), //应用商店 'shop' => array( 'class' => 'application.modules.shop.ShopModule', ), //学情跟踪3.0 'traceV3' => array( 'class' => 'application.modules.traceV3.TraceV3Module', ), //tms 教学管理系统总入口 'tms'=>array( 'class'=>'application.modules.tms.TmsModule', ), //名师同步讲 'tsapi'=>array( 'class'=>'application.modules.tsapi.TsapiModule', ), //家长云 'parents'=>array( 'class'=>'application.modules.parents.ParentsModule', ), 'yujiao'=>array( 'class'=>'application.modules.yujiao.YujiaoModule', ), 'cpresource'=>array( 'class'=>'application.modules.cpresource.CpresourceModule', ), 'evaluation'=>array( 'class'=>'application.modules.evaluation.EvaluationModule', ), 'juweike'=>array( 'class'=>'application.modules.juweike.JuweikeModule', ), 'renrentong'=>array( 'class'=>'application.modules.renrentong.RenrentongModule', ), 'classdevice'=>array( 'class'=>'application.modules.classdevice.ClassdeviceModule', ), 'areatms'=>array( 'class'=>'application.modules.areatms.AreatmsModule', ), 'huijiaoyun'=>array( 'class'=>'application.modules.huijiaoyun.HuijiaoyunModule', ), 'courseCenter'=>array( 'class' => 'application.modules.courseCenter.CourseCenterModule', ), ), ~~~ ## 引入自定义服务类 ~~~ 'wkImport'=>array('utils','hybrid','service'), 'import'=>array( 'application.models.address.*', ... 'application.components.*', 'application.library.*', 'application.filters.UsualFilter', 'application.extensions.nestedset.*', 'application.modules.maoming.*', 'application.controllers.actions.*', 'application.extensions.wechat.*', ... ),