Request Lifecycle
WpMVC manages the request lifecycle by abstracting WordPress hooks into a structured pipeline. This ensures that every request follows a predictable path, making debugging and extension straightforward.
Lifecycle Overview
The following diagram illustrates the high-level orchestration of a request lifecycle, from the initial WordPress core hook to the final delivery.
Internal Workflow
- Entry Point: WordPress loads the plugin, triggering the lifecycle manager.
- App Bootstrapping: The
Appsingleton andContainerare initialized. - Provider Registration: Service Providers are registered and their
bootmethods are executed. - Routing: The
Routermatches incoming HTTP/AJAX requests. - Middleware Pipeline: The request passes through any assigned middleware for validation or security.
- Controller Execution: The controller handles business logic and interfaces with models.
- Response Delivery: The results are returned as a JSON response or rendered view.
Last updated on