final class ApiEndpointConfig (View source)

Captures the resolved route and authorization policy for one framework-owned API endpoint.

Methods

__construct(bool $enabled, string $route, ApiAccess $access, array $scopes = [])

Initializes an immutable endpoint policy consumed during framework endpoint registration.

bool

Reports whether the framework should register this endpoint.

bool
string
route()

Returns the endpoint path relative to the configured API prefix.

string
ApiAccess
access()

Returns the authentication boundary enforced before endpoint dispatch.

ApiAccess
array
scopes()

Returns every scope required after the endpoint access boundary is satisfied.

array

Details

__construct

__construct(bool $enabled, string $route, ApiAccess $access, array $scopes = [])

Initializes an immutable endpoint policy consumed during framework endpoint registration.

Parameters

bool $enabled
string $route
ApiAccess $access
array $scopes

enabled

bool enabled()

Reports whether the framework should register this endpoint.

Return Value

bool

route

string route()

Returns the endpoint path relative to the configured API prefix.

Return Value

string

access

ApiAccess access()

Returns the authentication boundary enforced before endpoint dispatch.

Return Value

ApiAccess

scopes

array scopes()

Returns every scope required after the endpoint access boundary is satisfied.

Return Value

array