Skip to content

Stop matching routes after first match? #156

Description

@ePirat

Maybe I am getting it wrong but I thought after a route matches and callback is executed, klein should not try to match any other routes…
But I've just tried it out:

// Backend (Admin panel)

$klein->respond('GET', '/admin/?', function ($request, $response, $service) {
    return 'Hello Admin!';
});

// Main Views

$klein->respond('GET', '/[:fuubar]/?', function ($request, $response, $service) {
    return 'Hello Fuubar!';
});

This code creates: Hello Admin!Hello Fuubar!, is this intended?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions