开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
1 Star 0 Fork 921

张健(peter)/IBOS

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (2)
标签 (6)
master
develop
4.2
3.9
3.8
3.5
v3.5
3.3
master
分支 (2)
标签 (6)
master
develop
4.2
3.9
3.8
3.5
v3.5
3.3
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (2)
标签 (6)
master
develop
4.2
3.9
3.8
3.5
v3.5
3.3
IBOS
/
library
/
web
/
CWebModule.php
IBOS
/
library
/
web
/
CWebModule.php
CWebModule.php 6.53 KB
一键复制 编辑 原始数据 按行查看 历史
seekArt 提交于 2015年07月21日 17:24 +08:00 . 提交初始版本
<?php
/**
* CWebModule class file.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
/**
* CWebModule represents an application module.
*
* An application module may be considered as a self-contained sub-application
* that has its own controllers, models and views and can be reused in a different
* project as a whole. Controllers inside a module must be accessed with routes
* that are prefixed with the module ID.
*
* @property string $name The name of this module.
* @property string $description The description of this module.
* @property string $version The version of this module.
* @property string $controllerPath The directory that contains the controller classes. Defaults to 'moduleDir/controllers'
* where moduleDir is the directory containing the module class.
* @property string $viewPath The root directory of view files. Defaults to 'moduleDir/views' where moduleDir is
* the directory containing the module class.
* @property string $layoutPath The root directory of layout files. Defaults to 'moduleDir/views/layouts' where
* moduleDir is the directory containing the module class.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @package system.web
*/
class CWebModule extends CModule
{
/**
* @var string the ID of the default controller for this module. Defaults to 'default'.
*/
public $defaultController='default';
/**
* @var mixed the layout that is shared by the controllers inside this module.
* If a controller has explicitly declared its own {@link CController::layout layout},
* this property will be ignored.
* If this is null (default), the application's layout or the parent module's layout (if available)
* will be used. If this is false, then no layout will be used.
*/
public $layout;
/**
* @var string Namespace that should be used when loading controllers.
* Default is to use global namespace.
* @since 1.1.11
*/
public $controllerNamespace;
/**
* @var array mapping from controller ID to controller configurations.
* Pleaser refer to {@link CWebApplication::controllerMap} for more details.
*/
public $controllerMap=array();
private $_controllerPath;
private $_viewPath;
private $_layoutPath;
/**
* Returns the name of this module.
* The default implementation simply returns {@link id}.
* You may override this method to customize the name of this module.
* @return string the name of this module.
*/
public function getName()
{
return basename($this->getId());
}
/**
* Returns the description of this module.
* The default implementation returns an empty string.
* You may override this method to customize the description of this module.
* @return string the description of this module.
*/
public function getDescription()
{
return '';
}
/**
* Returns the version of this module.
* The default implementation returns '1.0'.
* You may override this method to customize the version of this module.
* @return string the version of this module.
*/
public function getVersion()
{
return '1.0';
}
/**
* @return string the directory that contains the controller classes. Defaults to 'moduleDir/controllers' where
* moduleDir is the directory containing the module class.
*/
public function getControllerPath()
{
if($this->_controllerPath!==null)
return $this->_controllerPath;
else
return $this->_controllerPath=$this->getBasePath().DIRECTORY_SEPARATOR.'controllers';
}
/**
* @param string $value the directory that contains the controller classes.
* @throws CException if the directory is invalid
*/
public function setControllerPath($value)
{
if(($this->_controllerPath=realpath($value))===false || !is_dir($this->_controllerPath))
throw new CException(Yii::t('yii','The controller path "{path}" is not a valid directory.',
array('{path}'=>$value)));
}
/**
* @return string the root directory of view files. Defaults to 'moduleDir/views' where
* moduleDir is the directory containing the module class.
*/
public function getViewPath()
{
if($this->_viewPath!==null)
return $this->_viewPath;
else
return $this->_viewPath=$this->getBasePath().DIRECTORY_SEPARATOR.'views';
}
/**
* @param string $path the root directory of view files.
* @throws CException if the directory does not exist.
*/
public function setViewPath($path)
{
if(($this->_viewPath=realpath($path))===false || !is_dir($this->_viewPath))
throw new CException(Yii::t('yii','The view path "{path}" is not a valid directory.',
array('{path}'=>$path)));
}
/**
* @return string the root directory of layout files. Defaults to 'moduleDir/views/layouts' where
* moduleDir is the directory containing the module class.
*/
public function getLayoutPath()
{
if($this->_layoutPath!==null)
return $this->_layoutPath;
else
return $this->_layoutPath=$this->getViewPath().DIRECTORY_SEPARATOR.'layouts';
}
/**
* @param string $path the root directory of layout files.
* @throws CException if the directory does not exist.
*/
public function setLayoutPath($path)
{
if(($this->_layoutPath=realpath($path))===false || !is_dir($this->_layoutPath))
throw new CException(Yii::t('yii','The layout path "{path}" is not a valid directory.',
array('{path}'=>$path)));
}
/**
* The pre-filter for controller actions.
* This method is invoked before the currently requested controller action and all its filters
* are executed. You may override this method in the following way:
* <pre>
* if(parent::beforeControllerAction($controller,$action))
* {
* // your code
* return true;
* }
* else
* return false;
* </pre>
* @param CController $controller the controller
* @param CAction $action the action
* @return boolean whether the action should be executed.
*/
public function beforeControllerAction($controller,$action)
{
if(($parent=$this->getParentModule())===null)
$parent=Yii::app();
return $parent->beforeControllerAction($controller,$action);
}
/**
* The post-filter for controller actions.
* This method is invoked after the currently requested controller action and all its filters
* are executed. If you override this method, make sure you call the parent implementation at the end.
* @param CController $controller the controller
* @param CAction $action the action
*/
public function afterControllerAction($controller,$action)
{
if(($parent=$this->getParentModule())===null)
$parent=Yii::app();
$parent->afterControllerAction($controller,$action);
}
}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

基于Yii和bootstrap的开源OA/协同办公平台,连接全平台覆盖的酷办公客户端(Win,IOS,Android,Mac,Linux),支撑您的企业管理二次开发--作为国内首家开源OA,有的不只是颜值
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/case-code/IBOS.git
git@gitee.com:case-code/IBOS.git
case-code
IBOS
IBOS
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /