thinkphp/library/think/Controller.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2017 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think;
\think\Loader::import('controller/Jump', TRAIT_PATH, EXT);
use think\exception\ValidateException;
class Controller
{
use \traits\controller\Jump;
/**
* @var \think\View 视图类实例
*/
protected $view;
/**
* @var \think\Request Request实例
*/
protected $request;
// 验证失败是否抛出异常
protected $failException = false;
// 是否批量验证
protected $batchValidate = false;
/**
* 前置操作方法列表
* @var array $beforeActionList
* @access protected
*/
protected $beforeActionList = [];
/**
* 构造方法
* @param Request $request Request对象
* @access public
*/
public function __construct(Request $request = null)
{
if (is_null($request)) {
$request = Request::instance();
}
$this->view = View::instance(Config::get('template'), Config::get('view_replace_str'));
$this->request = $request;
// 控制器初始化
$this->_initialize();
// 前置操作方法
if ($this->beforeActionList) {
foreach ($this->beforeActionList as $method => $options) {
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。