Version 0.9.5 beta - added additional getSession to the controller, in order to have the direct access through the framework

This commit is contained in:
Stephan Kasdorf
2020-10-09 00:04:44 +02:00
parent 9e1ee98ff7
commit 312ca6a776

View File

@@ -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;
}
}
}