Console, Middleware, and Events
The documentation is constantly evolving and updated alongside the project's progress. Since it is developed in parallel with the code, some sections may temporarily refer to earlier versions of the system-these are gradually adapted to the current state of the application. If you notice any outdated information, please report it or open an Issue / Pull Request.
Documentation
# Console, Middleware, and Events
These framework components run outside or around a controller action: CLI commands and workers, PSR-15 middleware, and application event dispatch.
# Console
AbstractCommand and AbstractConsoleRunner provide command abstractions. CommandRunner executes commands; AbstractWorker and WorkerRunner support worker-style processes; ConsoleRequest represents console input. Applications define command and worker discovery/configuration. See Console Commands and Workers; the framework alone does not define a universal command list.
# Middleware
Middleware implements PSR-15 and can inspect or transform a request before delegating. Framework middleware includes CORS, exception conversion, request logging, session startup, route matching, and debug-toolbar integration.
Register middleware in an intentional order. Exception handling generally wraps downstream work. Session startup must precede session use. Route-aware authorization requires route matching to attach the matched route. See Middleware for the request-handler contract and pipeline behavior.
# Events
EventDispatcher dispatches to explicitly registered listeners. EventServiceProvider loads the event/listener map, ListenerInterface defines a listener contract, and SecurityEvent/EventSecurityLogger support security logging. Listeners are not auto-discovered. See Events for synchronous and file-queued dispatch and the queue's delivery limits.
# Debug tooling
DebugRegistry, DebugToolbar, CollectorInterface, and debug middleware support diagnostics. Enable them only where appropriate and avoid exposing secrets. DBM Platform's global dump() helper and template flash messages are documented in Debug Output and Flash Messages.