final class ApiConfig (View source)

Carries the resolved API runtime policy and its nested security and framework settings.

Methods

__construct(bool $enabled, string $prefix, array $endpointProviders, ApiSecurityConfig $security, FrameworkApiConfig $framework)

Captures immutable API configuration consumed by endpoint registration and middleware.

bool

Reports whether API route registration is enabled.

bool
string
prefix()

Returns the normalized path prefix shared by all API endpoints.

string
array

Returns application endpoint provider classes in registration order.

array

Returns the resolved API authentication settings.

Returns the built-in health and documentation endpoint settings.

Details

__construct

__construct(bool $enabled, string $prefix, array $endpointProviders, ApiSecurityConfig $security, FrameworkApiConfig $framework)

Captures immutable API configuration consumed by endpoint registration and middleware.

Parameters

bool $enabled
string $prefix
array $endpointProviders
ApiSecurityConfig $security
FrameworkApiConfig $framework

enabled

bool enabled()

Reports whether API route registration is enabled.

Return Value

bool

prefix

string prefix()

Returns the normalized path prefix shared by all API endpoints.

Return Value

string

endpointProviders

array endpointProviders()

Returns application endpoint provider classes in registration order.

Return Value

array

security

Returns the resolved API authentication settings.

Return Value

ApiSecurityConfig

framework

Returns the built-in health and documentation endpoint settings.

Return Value

FrameworkApiConfig