final class ApiEndpointRegistrar (View source)

Materializes registered API endpoint definitions as named framework routes under one prefix.

Methods

__construct(Router $router, ApiEndpointRegistry $registry, ApiRoutePathResolver $pathResolver = new ApiRoutePathResolver())

Binds route registration to the canonical router, endpoint registry and path policy.

void
registerRoutes(string $prefix)

Registers every current endpoint with its composed path and stable endpoint name.

void

Details

__construct

__construct(Router $router, ApiEndpointRegistry $registry, ApiRoutePathResolver $pathResolver = new ApiRoutePathResolver())

Binds route registration to the canonical router, endpoint registry and path policy.

Parameters

Router $router
ApiEndpointRegistry $registry
ApiRoutePathResolver $pathResolver

registerRoutes

void registerRoutes(string $prefix)

Registers every current endpoint with its composed path and stable endpoint name.

Parameters

string $prefix

Return Value

void