objects
Session
Session values and flash messages under one name, so views and addons can't overwrite each other's keys.
Login and throttling are on SessionRoot, outside every scope.
$session
Phlat\Session
6 methods
Show
Methods
$session->delete(string $key): void
Removes the value under $key.
Parameters (1)
| $key | string |
phlat/src/Session.php:48
$session->flash(string $key, mixed $value): void
Stores $value for the next request only; read it with pop().
Parameters (2)
| $key | string | |
| $value | mixed |
phlat/src/Session.php:55
$session->get(string $key): mixed
The value stored under $key, or null.
Parameters (1)
| $key | string |
Returns mixed
phlat/src/Session.php:26
$session->has(string $key): bool
Whether a value is stored under $key.
Parameters (1)
| $key | string |
Returns bool
phlat/src/Session.php:41
$session->pop(string $key, mixed $default = null): mixed
Reads and removes a flashed value.
Parameters (2)
| $key | string | |
| $default | mixed = null |
Returns mixed
phlat/src/Session.php:62
$session->set(string $key, mixed $value): mixed
Stores $value under $key and returns it.
Parameters (2)
| $key | string | |
| $value | mixed |
Returns mixed
phlat/src/Session.php:33