ApiConfigDefinition
final class ApiConfigDefinition extends AbstractConfigDefinition (View source)
Collects typed API configuration overrides for later ordered resolution.
Properties
| protected mixed[] | $data | from AbstractConfigDefinition |
Methods
Replaces one configuration value at a dot-separated path.
Appends one configuration value at a dot-separated list path.
Creates an empty definition that inherits all unresolved API defaults.
Returns the configuration module key consumed by the API resolver.
Overrides whether the API module registers middleware and routes.
Disables API middleware and route registration.
Overrides the shared path prefix for framework and application API endpoints.
Appends one application endpoint provider while preserving declaration order.
Replaces the endpoint provider list for this definition.
Enables the built-in bearer authenticator with its token and effective scopes.
Disables the built-in bearer authenticator without removing its other overrides.
Replaces the configured scopes assigned to a valid static bearer identity.
Overrides whether framework-owned API endpoints other than health are registered.
Disables framework-owned OpenAPI and documentation endpoints.
Enables the framework health endpoint.
Disables the framework health endpoint.
Overrides the health path relative to the API prefix.
Overrides the authorization mode enforced for the health endpoint.
Enables the generated OpenAPI endpoint.
Disables the generated OpenAPI endpoint.
Overrides the OpenAPI document path relative to the API prefix.
Overrides the authorization mode enforced for the OpenAPI document.
Replaces the scopes required by the OpenAPI document endpoint.
Enables the human-readable API documentation endpoint.
Disables the human-readable API documentation endpoint.
Overrides the documentation path relative to the API prefix.
Overrides the authorization mode enforced for human-readable documentation.
Replaces the scopes required by the human-readable documentation endpoint.
Details
toArray
array
toArray()
No description
set
protected AbstractConfigDefinition
set(string $path, mixed $value)
Replaces one configuration value at a dot-separated path.
append
protected AbstractConfigDefinition
append(string $path, mixed $value)
Appends one configuration value at a dot-separated list path.
create
static ApiConfigDefinition
create()
Creates an empty definition that inherits all unresolved API defaults.
moduleKey
static string
moduleKey()
Returns the configuration module key consumed by the API resolver.
enabled
ApiConfigDefinition
enabled(bool $enabled = true)
Overrides whether the API module registers middleware and routes.
prefix
ApiConfigDefinition
prefix(string $prefix)
Overrides the shared path prefix for framework and application API endpoints.
endpointProvider
ApiConfigDefinition
endpointProvider(string $providerClass)
Appends one application endpoint provider while preserving declaration order.
endpointProviders
ApiConfigDefinition
endpointProviders(array $providerClasses)
Replaces the endpoint provider list for this definition.
staticBearer
ApiConfigDefinition
staticBearer(mixed $token, array $scopes = [])
Enables the built-in bearer authenticator with its token and effective scopes.
An omitted scope list grants the built-in administrative scope.
staticBearerDisabled
ApiConfigDefinition
staticBearerDisabled()
Disables the built-in bearer authenticator without removing its other overrides.
staticBearerScopes
ApiConfigDefinition
staticBearerScopes(array $scopes)
Replaces the configured scopes assigned to a valid static bearer identity.
frameworkEnabled
ApiConfigDefinition
frameworkEnabled(bool $enabled = true)
Overrides whether framework-owned API endpoints other than health are registered.
frameworkDisabled
ApiConfigDefinition
frameworkDisabled()
Disables framework-owned OpenAPI and documentation endpoints.
healthRoute
ApiConfigDefinition
healthRoute(string $route)
Overrides the health path relative to the API prefix.
healthAccess
ApiConfigDefinition
healthAccess(ApiAccess|string $access)
Overrides the authorization mode enforced for the health endpoint.
openApiRoute
ApiConfigDefinition
openApiRoute(string $route)
Overrides the OpenAPI document path relative to the API prefix.
openApiAccess
ApiConfigDefinition
openApiAccess(ApiAccess|string $access)
Overrides the authorization mode enforced for the OpenAPI document.
openApiScopes
ApiConfigDefinition
openApiScopes(array $scopes)
Replaces the scopes required by the OpenAPI document endpoint.
docsEnabled
ApiConfigDefinition
docsEnabled()
Enables the human-readable API documentation endpoint.
docsDisabled
ApiConfigDefinition
docsDisabled()
Disables the human-readable API documentation endpoint.
docsRoute
ApiConfigDefinition
docsRoute(string $route)
Overrides the documentation path relative to the API prefix.
docsAccess
ApiConfigDefinition
docsAccess(ApiAccess|string $access)
Overrides the authorization mode enforced for human-readable documentation.
docsScopes
ApiConfigDefinition
docsScopes(array $scopes)
Replaces the scopes required by the human-readable documentation endpoint.