Skip to content

Add ability to inject RouteCollector into simpleDispatcher #40

@msheakoski

Description

@msheakoski

I extended RouteCollector to do some pre-processing on the route definitions before adding them and when trying to use simpleDispatcher, I discovered that I needed to duplicate that code because FastRoute\RouteCollector is a hard-wired dependency.

What do you think about adding "routeCollector" => "FastRoute\\RouteCollector" to the $options array in simpleDispatcher? It would be a backwards compatible change but add the ability to inject a custom RouteCollector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions