From 3d4bbd7e9428f2907a8af7ed5325bb54b05e4a56 Mon Sep 17 00:00:00 2001 From: augushong Date: Sat, 9 Sep 2023 10:46:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=B4=E6=97=B6=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E5=B8=83=E5=B1=80=E7=9A=84=E7=94=A8=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E8=BF=94=E5=9B=9Etemplate=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ src/Think.php | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index 485dee6..ca89774 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .idea +/vendor +/composer.lock \ No newline at end of file diff --git a/src/Think.php b/src/Think.php index 562b54a..7bbbc0c 100644 --- a/src/Think.php +++ b/src/Think.php @@ -252,6 +252,19 @@ public function getConfig(string $name) return $this->template->getConfig($name); } + /** + * 设置布局 + * @access public + * @param bool|string $name 布局模板名称 false 则关闭布局 + * @param string $replace 布局模板内容替换标识 + * @return $this + */ + public function layout(bool|string $name, string $replace = '') + { + $this->template->layout($name, $replace); + return $this; + } + public function __call($method, $params) { return call_user_func_array([$this->template, $method], $params);