$init
$init : boolean
getSet(string $key, mixed $default) : mixed
This is a convenience method to prevent having to do several checks/set for all persistant variables.
If the key name has been passed via POST then that value is stored in the session and returned. If the key name has been passed via GET then that value is stored in the session and returned. If there is already a value in the session data then that is returned. If all else fails then the default value is returned. All checks are truthy/falsy (so a POST value of "0" is ignored).
string | $key | The name of the key to retrieve from session data |
mixed | $default | The value to use if the current session value is falsy |