thephpleague / route

Fast PSR-7 based routing and dispatch component including PSR-15 middleware, built on top of FastRoute.
http://route.thephpleague.com
MIT License
651 stars 126 forks source link

Feature: Extra map() options #329

Open Visualq opened 1 year ago

Visualq commented 1 year ago

Currently the map function signature is:

public function map(string $method, string $path, $handler): Route

It would be nice if we are able to pass some extra options along:

public function map(string $method, string $path, $handler, array $options = []): Route

Or if this is achievable in another way without having to instantiate the handler first?