From 9b94cb9d4bd6a73cbc7c57b381aa9f183055589a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 9 Dec 2015 17:12:24 +0800 Subject: [PATCH] =?UTF-8?q?controller=E7=B1=BB=E5=A2=9E=E5=8A=A0config?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/controller.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/library/think/controller.php b/library/think/controller.php index da53649c..cd9f774a 100644 --- a/library/think/controller.php +++ b/library/think/controller.php @@ -11,14 +11,21 @@ namespace think; -use think\View; - class Controller { + /** + * 控制器参数 + * @var config + * @access protected + */ + protected $config = [ + // 前置操作方法 + 'before_action_list' => [], + ]; + /** * 架构函数 初始化视图类 并采用内置模板引擎 * @access public - * * @param array $config */ public function __construct($config = []) @@ -45,7 +52,7 @@ class Controller * 设置控制器参数 * @access public * @param array $config 视图参数 - * @return View + * @return Think\Controller */ public function config($config = []) {