interface StackInterface (View source)

Methods

withMiddleware(MiddlewareInterface $middleware)

Return an instance with the specified middleware added to the stack.

withoutMiddleware(MiddlewareInterface $middleware)

Return an instance without the specified middleware.

Response
process(Request $request)

Process the request through middleware and return the response.

Details

StackInterface withMiddleware(MiddlewareInterface $middleware)

Return an instance with the specified middleware added to the stack.

This method MUST be implemented in such a way as to retain the immutability of the stack, and MUST return an instance that contains the specified middleware.

Parameters

MiddlewareInterface $middleware

Return Value

StackInterface

StackInterface withoutMiddleware(MiddlewareInterface $middleware)

Return an instance without the specified middleware.

This method MUST be implemented in such a way as to retain the immutability of the stack, and MUST return an instance that does not contain the specified middleware.

Parameters

MiddlewareInterface $middleware

Return Value

StackInterface

Response process(Request $request)

Process the request through middleware and return the response.

This method MUST be implemented in such a way as to allow the same stack to be reused for processing multiple requests in sequence.

Parameters

Request $request

Return Value

Response