Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Session Laravel Package

joomla/session

Framework-agnostic PHP 8.1+ session management from the Joomla Framework. Provides interfaces and utilities to start and manage sessions, store and retrieve session data, and integrate session handling cleanly within your application.

View on GitHub
Deep Wiki
Context7

Joomla\Session\Session

The Session class is the default implementation of Joomla\Session\SessionInterface. In addition to implementing the interface, the Session class provides additional features such as lazily started sessions, validation of session data, and event hooks for allowing integrations to act on key events in the session lifetime.

Session Data Validation

Add a session validator

The addValidator() method is used to add a validator for the current session, triggered immediately after the session is started. All validators must implement Joomla\Session\ValidatorInterface.

/**
 * [@param](https://github.com/param)   ValidatorInterface  $validator  The session validator
 *
 * [@return](https://github.com/return)  void
 */
public function addValidator(ValidatorInterface $validator);

Session State Interactions

Get the session state

The getState() method is used to get the current state of the session.

/**
 * Get current state of session
 *
 * [@return](https://github.com/return)  string  The session state
 */
public function getState();

Event Hooks

Session Started

When a session is started, the Session class dispatches the SessionEvents::START event to allow event listeners to perform extra actions after a session has been started. A Joomla\Session\SessionEvent instance is provided to listeners with the current Session instance.

Note, for backward compatibility the onAfterSessionStart event is also dispatched if any listeners are subscribed to that event, however this event is deprecated and will not be supported in the Joomla! Framework 3.0 release.

Session Restarted

When a session is restarted, the Session class dispatches the SessionEvents::RESTART event to allow event listeners to perform extra actions after a session has been restarted. A Joomla\Session\SessionEvent instance is provided to listeners with the current Session instance.

Note, for backward compatibility the onAfterSessionRestart event is also dispatched if any listeners are subscribed to that event, however this event is deprecated and will not be supported in the Joomla! Framework 3.0 release.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport