From e5268efcdf1d12dd3c54d8f4947da5f00409b67e Mon Sep 17 00:00:00 2001 From: Abel Hoogeveen Date: Tue, 5 Mar 2019 11:16:05 +0100 Subject: [PATCH] Release 1.2.0-RC3 --- composer.json | 2 +- src/FuzeWorks/Layout.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 7e272aa..cf46bd4 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ ], "require": { "php": ">=7.1.0", - "fuzeworks/core": "1.2.0-RC2" + "fuzeworks/core": "1.2.0-RC3" }, "require-dev": { "ext-json": "*", diff --git a/src/FuzeWorks/Layout.php b/src/FuzeWorks/Layout.php index cf5abab..0a2950b 100644 --- a/src/FuzeWorks/Layout.php +++ b/src/FuzeWorks/Layout.php @@ -128,6 +128,7 @@ class Layout * @return mixed * @throws LayoutException On error * @throws EventException + * @throws Exception\ConfigException */ public function display(string $file, array $directories = []): bool { @@ -514,8 +515,10 @@ class Layout /** * Resets the layout manager to its default state. + * + * @param bool $keep_assigned_vars */ - public function reset() + public function reset(bool $keep_assigned_vars = false) { if (!is_null($this->current_engine)) $this->current_engine->reset(); @@ -526,7 +529,9 @@ class Layout $this->file_extensions = array(); $this->current_engine = null; - $this->assigned_variables = array(); + if (!$keep_assigned_vars) + $this->assigned_variables = array(); + Logger::log('Reset the layout manager to its default state'); } } \ No newline at end of file