Session
class Session implements CollectionInterface (View source)
Constants
| CORE_SESSION_KEY |
The internal session variable |
Methods
Get session singleton
Generate session
Allows you to empty the session
Session starter.
Allows checking for the existence of a key in the session collection
Allows checking for the existence of a key in the session collection
Check whether a collection is empty.
Retrieves a value or value collection.
Add flash data After the data recovery is automatic deleted
The add alias
Add an entry to the collection
Returns the list of session variables
Delete an entry in the collection
set
Returns the list of session data as an array.
Empty the flash system.
Allows to clear the cache except csrf and __bow.flash
Returns the list of session data as a toObject.
__toString
Details
static Session
configure(array $config)
Configure session instance
static Session|null
getInstance()
Get session singleton
void
regenerate()
Generate session
void
flush()
Allows you to empty the session
bool
start()
Session starter.
bool
exists(string $key)
Allows checking for the existence of a key in the session collection
bool
has(string|int $key, bool $strict = false)
Allows checking for the existence of a key in the session collection
bool
isEmpty()
Check whether a collection is empty.
mixed
get(mixed $key, mixed $default = null)
Retrieves a value or value collection.
mixed
flash(string|int $key, string|null $message = null)
Add flash data After the data recovery is automatic deleted
mixed
put(string|int $key, mixed $value, $next = false)
The add alias
mixed
add(string|int $key, mixed $data, bool $next = false)
Add an entry to the collection
array
all()
Returns the list of session variables
mixed
remove(string|int $key)
Delete an entry in the collection
mixed
set(string $key, mixed $value)
set
array
toArray()
Returns the list of session data as an array.
void
clearFlash()
Empty the flash system.
void
clear()
Allows to clear the cache except csrf and __bow.flash
array
toObject()
Returns the list of session data as a toObject.
string
__toString()
__toString