From 13f3e5de399388e6e4e40f2e28a4059bb47e213e Mon Sep 17 00:00:00 2001 From: bim-g Date: Thu, 25 Apr 2024 22:25:03 +0200 Subject: [PATCH] [ENH] refactor view to display all data assigned --- src/Core/View.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Core/View.php b/src/Core/View.php index b0f6200..64f7ce0 100644 --- a/src/Core/View.php +++ b/src/Core/View.php @@ -244,6 +244,14 @@ public function assign(string $variable, $value) $this->data[$variable] = $value; } + /** + * List all data assigned before being displayed + * @return array + */ + public function getAssignData(): array + { + return $this->data; + } /** * you should provide the extension of your file, * in another case the file will be missing @@ -273,4 +281,4 @@ public function resetConfig(){ $this->layout = ''; $this->folder_name = ''; } -} \ No newline at end of file +}