trait HasMiddlewareDefinitionsTrait (View source)

Provide middleware definitions.

Methods

void
setMiddleware(array $middleware)

Register middleware.

void
setMiddlewareGroups(array $middleware_groups)

Register middleware groups.

string[]
uniqueMiddleware(array[] $middleware)

Filter array of middleware into a unique set.

array[]
expandMiddleware(string[] $middleware)

Expand array of middleware into an array of fully qualified class names.

array[]
expandMiddlewareGroup(string $group)

Expand a middleware group into an array of fully qualified class names.

array[]
expandMiddlewareMolecule(string $middleware)

Expand middleware into an array of fully qualified class names and any companion arguments.

string
expandMiddlewareAtom(string $middleware)

Expand a single middleware a fully qualified class name.

Details

void setMiddleware(array $middleware)

Register middleware.

Parameters

array $middleware string> $middleware

Return Value

void

void setMiddlewareGroups(array $middleware_groups)

Register middleware groups.

Parameters

array $middleware_groups string[]> $middleware_groups

Return Value

void

string[] uniqueMiddleware(array[] $middleware)

Filter array of middleware into a unique set.

Parameters

array[] $middleware

Return Value

string[]

array[] expandMiddleware(string[] $middleware)

Expand array of middleware into an array of fully qualified class names.

Parameters

string[] $middleware

Return Value

array[]

array[] expandMiddlewareGroup(string $group)

Expand a middleware group into an array of fully qualified class names.

Parameters

string $group

Return Value

array[]

array[] expandMiddlewareMolecule(string $middleware)

Expand middleware into an array of fully qualified class names and any companion arguments.

Parameters

string $middleware

Return Value

array[]

string expandMiddlewareAtom(string $middleware)

Expand a single middleware a fully qualified class name.

Parameters

string $middleware

Return Value

string