Skip to content

Add arguments to MiddlewareName #17

@rodber

Description

@rodber

Need to support middleware arguments in the form of TheMiddleware::class:arg1,arg2 or perhaps middleware(TheMiddleware::class, pairs).

The arguments must be stored at MiddlewareName, used at Router to pass $middleware->setUp(...$args).

Middleware with arguments must implement a given interface for setUp(mixed ...$arg), where it stores the arguments at class properties available to the handle method.

Alternatively we could spawn another MiddlewareInterface which doesn't restrict parameters on handle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions