zeroem / deferred-request-bundle
Utilities for deferring request processing to some point in the future
dev-master
2012-06-26 06:31 UTC
Requires
- doctrine/orm: >=2.2,<2.4-dev
- symfony/symfony: dev-master
This package is not auto-updated.
Last update: 2024-11-03 04:37:15 UTC
README
Provides utilities to mark controller actions as deferred. By simply
adding the @Defer
annotation to any Controller or Action, the request
will be intercepted during the KernelEvents::CONTROLLER
phase of the
HttpKernel. At this point in time, the Request object will be serialized
and stored in the database for later processing via the deferred-request:process
console command.
When a Request is deferred, an appropriate HTTP 202 Response is returned containing :
- A Content-Location Header indicating where the deferred Response will be found
- A Link Header indicating where the status of the deferred Request may be monitored
Examples
Defer a single controller action
// ... /** * @Defer */ public function indexAction() { } // ...
Defer all actions on a controller
/** * @Defer */ class FooController extends Controller { // Actions... }