Skip to content
Corex

SubmitController

Corex\Forms\Submission\SubmitController · class · Forms layer

The REST boundary for submissions. A thin controller (Principle III): it adapts the WP request, runs it through the declared security middleware (nonce → form-shaped sanitize → throttle), delegates to the submission service, and maps the Response to a WP_REST_Response. Security is the middleware’s job, not the controller’s (Principle VII) — hence the public permission callback.

__construct(FormSubmissionService $service, Pipeline $pipeline, MiddlewareResolver $middleware, ClientAddress $client)

Section titled “__construct(FormSubmissionService $service, Pipeline $pipeline, MiddlewareResolver $middleware, ClientAddress $client)”

submit(WP_REST_Request $request): WP_REST_Response

Section titled “submit(WP_REST_Request $request): WP_REST_Response”