Store
class Store implements Session (View source)
Traits
Properties
static protected array | $macros | The registered string macros. |
from Macroable |
protected string | $id | The session ID. |
|
protected string | $name | The session name. |
|
protected array | $attributes | The session attributes. |
|
protected SessionHandlerInterface | $handler | The session handler implementation. |
|
protected string | $serialization | The session store's serialization strategy. |
|
protected bool | $started | Session store started status. |
Methods
Mix another object into the class.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Create a new session instance.
Start the session, reading the data from a handler.
Load the session data from the handler.
Read the session data from the handler.
Prepare the raw string data from the session for unserialization.
Marshal the ViewErrorBag when using JSON serialization for sessions.
Save the session data to storage.
Prepare the ViewErrorBag instance for JSON serialization.
Prepare the serialized session data for storage.
Age the flash data for the session.
Get all of the session data.
Get a subset of the session data.
Get all the session data except for a specified array of items.
Checks if a key exists.
Determine if the given key is missing from the session data.
Determine if a key is present and not null.
Determine if any of the given keys are present and not null.
Get an item from the session.
Get the value of a given key and then forget it.
Determine if the session contains old input.
Get the requested item from the flashed input array.
Replace the given session attributes entirely.
Put a key / value pair or array of key / value pairs in the session.
Push a value onto a session array.
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.
Flash a key / value pair to the session for immediate use.
Reflash all of the session flash data.
Reflash a subset of the current flash data.
Merge new flash keys into the new flash array.
Remove the given keys from the old flash data.
Flash an input array to the session.
Remove an item from the session, returning its value.
Remove one or many items from the session.
Remove all of the items from the session.
Flush the session data and regenerate the ID.
Generate a new session identifier.
Generate a new session ID for the session.
Determine if the session has been started.
Get the name of the session.
Set the name of the session.
Get the current session ID.
Get the current session ID.
Set the session ID.
Determine if this is a valid session ID.
Get a new, random session ID.
Set the existence of the session on the handler if applicable.
Get the CSRF token value.
Regenerate the CSRF token value.
Determine if the previous URI is available.
Get the previous URL from the session as a URI instance.
Get the previous URL from the session.
Set the "previous" URL in the session.
Specify that the user has confirmed their password.
Get the underlying session handler implementation.
Determine if the session handler needs a request.
Details
__construct(string $name, SessionHandlerInterface $handler, string|null $id = null, string $serialization = 'php')
Create a new session instance.
protected string
prepareForUnserialize(string $data)
Prepare the raw string data from the session for unserialization.
protected void
marshalErrorBag()
Marshal the ViewErrorBag when using JSON serialization for sessions.
protected void
prepareErrorBagForSerialization()
Prepare the ViewErrorBag instance for JSON serialization.
mixed
getOldInput(string|null $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.
SessionHandlerInterface
setHandler(SessionHandlerInterface $handler)
Set the underlying session handler implementation.