From 312ca6a77609238ebe26990090c50e5efd3b5ed8 Mon Sep 17 00:00:00 2001 From: Stephan Kasdorf Date: Fri, 9 Oct 2020 00:04:44 +0200 Subject: [PATCH] Version 0.9.5 beta - added additional getSession to the controller, in order to have the direct access through the framework --- core/c/controller.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/core/c/controller.php b/core/c/controller.php index 987980a..a5df02c 100644 --- a/core/c/controller.php +++ b/core/c/controller.php @@ -204,4 +204,21 @@ class Controller extends View return $_FILES; } } + + /** + * @param string $param + * @param bool $params + * @return string|array + */ + public function getSession( string $param, bool $params = false ) + { + if($param!="") + { + return $_SESSION[$param]; + } + elseif($params) + { + return $_SESSION; + } + } } \ No newline at end of file