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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user