Skip to content

Stop matching routes after first match? #156

Open
@ePirat

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions