Skip to content
Corex

FlowRestGateway

Corex\Forms\Flow\FlowRestGateway · class · Forms layer

Applies declared Flow REST middleware and maps domain results to envelopes.

__construct(Pipeline $pipeline, MiddlewareResolver $middleware)

Section titled “__construct(Pipeline $pipeline, MiddlewareResolver $middleware)”

What every flow route asks before a handler runs. The handlers ask again through the middleware, and a change needs a nonce as well. This is here so the route says it is guarded.

read(WP_REST_Request $request, callable $handler): WP_REST_Response

Section titled “read(WP_REST_Request $request, callable $handler): WP_REST_Response”

mutate(WP_REST_Request $request, array $shape, callable $handler): WP_REST_Response

Section titled “mutate(WP_REST_Request $request, array $shape, callable $handler): WP_REST_Response”