Skip to content

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.

class AssetAggregationMiddleware implements MiddlewareInterface

ImplementsMiddlewareInterface
SourceMiddleware/AssetAggregationMiddleware.php
MethodDescription
process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterfacePasses the request straight through to the rest of the stack.

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.

ParameterTypeDescription
$requestServerRequestInterface
$handlerRequestHandlerInterface

Returns ResponseInterface