NativeSession
final class NativeSession implements SessionInterface (View source)
Delegates the public session contract to the configured storage implementation
Methods
Connects the facade to the configured session storage implementation
Starts the delegated storage before any values are read or written
Reports the delegated storage initialization state
Checks the delegated storage for a value under the key
Reads a delegated value or returns the supplied fallback
Persists a delegated value under the key
Removes a delegated value under the key
Clears all values held by the delegated storage
Destroys the delegated identity and permits a later access to start a new one.
Regenerates the identifier through the delegated storage implementation
Details
__construct
__construct(SessionStorageInterface $storage)
Connects the facade to the configured session storage implementation
start
void
start()
Starts the delegated storage before any values are read or written
started
bool
started()
Reports the delegated storage initialization state
has
bool
has(string $key)
Checks the delegated storage for a value under the key
get
mixed
get(string $key, mixed $default = null)
Reads a delegated value or returns the supplied fallback
set
void
set(string $key, mixed $value)
Persists a delegated value under the key
remove
void
remove(string $key)
Removes a delegated value under the key
clear
void
clear()
Clears all values held by the delegated storage
destroy
void
destroy()
Destroys the delegated identity and permits a later access to start a new one.
regenerate
void
regenerate(bool $deleteOldSession = true)
Regenerates the identifier through the delegated storage implementation