AssetAggregationMiddleware
Collects legacy appended attributes like ‘css’ and ‘js’ from the Request (when using adapter) and exposes them as PSR request attributes assets.css and assets.js.
Synopsis
Section titled “Synopsis”class AssetAggregationMiddleware implements MiddlewareInterface
| Implements | MiddlewareInterface |
| Source | Middleware/AssetAggregationMiddleware.php |
Methods
Section titled “Methods”| Method | Description |
|---|---|
process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface | Passes the request straight through to the rest of the stack. |
process()
Section titled “process()”public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
Passes the request straight through to the rest of the stack.
Nothing is aggregated here: assets.css and assets.js are expected to be set as request attributes upstream, so this middleware neither reads nor writes them and leaves the response untouched. It stays in the after_action phase as the placement for asset collection.
| Parameter | Type | Description |
|---|---|---|
$request | ServerRequestInterface | |
$handler | RequestHandlerInterface |
Returns ResponseInterface