EncryptedStore
class EncryptedStore extends Store (View source)
Properties
protected string | $id | The session ID. | from Store |
protected string | $name | The session name. | from Store |
protected array | $attributes | The session attributes. | from Store |
protected SessionHandlerInterface | $handler | The session handler implementation. | from Store |
protected bool | $started | Session store started status. | from Store |
protected Encrypter | $encrypter | The encrypter instance. |
Methods
Create a new session instance.
Prepare the raw string data from the session for unserialization.
Prepare the serialized session data for storage.
Get the value of a given key and then forget it.
Get the requested item from the flashed input array.
Put a key / value pair or array of key / value pairs in the session.
Increment the value of an item in the session.
Decrement the value of an item in the session.
Flash a key / value pair to the session for immediate use.
Set the existence of the session on the handler if applicable.
Get the encrypter instance.
Details
at line 27
void
__construct(string $name, SessionHandlerInterface $handler, Encrypter $encrypter, string|null $id = null)
Create a new session instance.
at line 40
protected string
prepareForUnserialize(string $data)
Prepare the raw string data from the session for unserialization.
at line 55
protected string
prepareForStorage(string $data)
Prepare the serialized session data for storage.
mixed
pull(string $key, string $default = null)
Get the value of a given key and then forget it.
bool
hasOldInput(string $key = null)
Determine if the session contains old input.
mixed
getOldInput(string $key = null, mixed $default = null)
Get the requested item from the flashed input array.
void
put(string|array $key, mixed $value = null)
Put a key / value pair or array of key / value pairs in the session.
mixed
remember(string $key, Closure $callback)
Get an item from the session, or store the default value.
mixed
increment(string $key, int $amount = 1)
Increment the value of an item in the session.
int
decrement(string $key, int $amount = 1)
Decrement the value of an item in the session.
void
flash(string $key, mixed $value = true)
Flash a key / value pair to the session.
void
now(string $key, mixed $value)
Flash a key / value pair to the session for immediate use.
void
keep(array|mixed $keys = null)
Reflash a subset of the current flash data.
protected void
mergeNewFlashes(array $keys)
Merge new flash keys into the new flash array.
protected void
removeFromOldFlashData(array $keys)
Remove the given keys from the old flash data.
mixed
remove(string $key)
Remove an item from the session, returning its value.
void
setExists(bool $value)
Set the existence of the session on the handler if applicable.
SessionHandlerInterface
getHandler()
Get the underlying session handler implementation.
void
setRequestOnHandler(Request $request)
Set the request on the handler instance.