forked from fa/breadcrumb-the-shire
Pass AppContainer to SessionProvider::clear() so all module providers use SessionStoreInterface consistently instead of raw $_SESSION. Also add loading and error states to the notification bell dropdown (GR-UI-014). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
751 B
PHP
27 lines
751 B
PHP
<?php
|
|
|
|
namespace MintyPHP\App\Module\Contracts;
|
|
|
|
use MintyPHP\App\AppContainer;
|
|
|
|
/**
|
|
* Populates module-specific session data after login and cleans up on logout.
|
|
*
|
|
* Called from the login flow after successful authentication. When a module is
|
|
* deactivated, its provider is not called — session keys are simply not set.
|
|
*/
|
|
interface SessionProvider
|
|
{
|
|
/**
|
|
* Populate session keys with module-specific data after successful login.
|
|
*
|
|
* @param array<string, mixed> $user The authenticated user record
|
|
*/
|
|
public function populate(array $user, AppContainer $container): void;
|
|
|
|
/**
|
|
* Remove session keys owned by this module (called on logout).
|
|
*/
|
|
public function clear(AppContainer $container): void;
|
|
}
|