From 521769222453b69915013b5743c1dd54d31b7e66 Mon Sep 17 00:00:00 2001 From: shuipf Date: Sat, 20 Feb 2016 12:58:48 +0800 Subject: [PATCH] Update Think.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改Think驱动,增加config方法,支持参数配置和获取 --- library/think/view/driver/Think.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/library/think/view/driver/Think.php b/library/think/view/driver/Think.php index 1c7a21a0..24259c8f 100644 --- a/library/think/view/driver/Think.php +++ b/library/think/view/driver/Think.php @@ -29,4 +29,20 @@ class Think $this->template->fetch($template, $data); } } + + /** + * 修改模板引擎配置项 + * @access public + * @param array|string $config + * @return string|array + */ + public function config($config) + { + if(is_array($config)){ + $this->template->config($config); + return $this; + }else{ + return $this->template->config($config); + } + } }