Nexus API Reference

RouterMiddleware
in package
implements MiddlewareInterface

Read onlyYes
FinalYes
Tags
psalm-api

Innermost middleware. Dispatches the request, builds the per-request scope lazily (only if the route needs one), runs route-level middlewares, calls the handler, awaits Future if applicable, and disposes the scope in finally.

Table of Contents

Interfaces

MiddlewareInterface

Methods

__construct()  : mixed
process()  : ResponseInterface

Methods

__construct()

public __construct(Dispatcher $dispatcher, array<string, ResolvedHandler$handlersByRouteKey, array<string, array<int, MiddlewareInterface>> $routeMiddlewaresByKey, MiddlewarePipeline $pipeline, ActorSystem $system, ResolvedActorTable $actors, EventDispatcherInterface|null $events) : mixed
Parameters
$dispatcher : Dispatcher
$handlersByRouteKey : array<string, ResolvedHandler>

key = "METHOD:path"

$routeMiddlewaresByKey : array<string, array<int, MiddlewareInterface>>
$pipeline : MiddlewarePipeline
$system : ActorSystem
$actors : ResolvedActorTable
$events : EventDispatcherInterface|null

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

        
On this page

Search results