agent foundation

This commit is contained in:
2026-03-06 00:44:52 +01:00
parent 9819cba733
commit 9a08f96c11
199 changed files with 8522 additions and 1880 deletions

View File

@@ -4,6 +4,7 @@ namespace MintyPHP\Support;
use MintyPHP\Session;
// Session-based flash message store. Messages are written before a redirect and consumed on the next page.
class Flash
{
private const SESSION_KEY = 'flash_messages';
@@ -19,6 +20,7 @@ class Flash
}
}
// If a key is given, any existing message with the same key+scope is replaced — prevents duplicate notices.
public static function add(string $type, string $message, ?string $scope = null, ?string $key = null): string
{
self::ensureSession();
@@ -93,6 +95,7 @@ class Flash
}
}
// Prevents messages from being cleared on the next render — useful when a redirect chain crosses multiple pages.
public static function keep(int $times = 1)
{
self::ensureSession();