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