Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace using multiple countries #306

Open
hoffmanns opened this issue Oct 22, 2015 · 2 comments
Open

Namespace using multiple countries #306

hoffmanns opened this issue Oct 22, 2015 · 2 comments

Comments

@hoffmanns
Copy link

I am trying to use namespaces for multiple countries and use the country to setup a service.

$klein->with("/[at|de:country]", function () use ($klein) {
    // catch all (not called)
    $klein->respond(function($request, $response, $service, $app) {
       // create service based on $request->country
    });
    // specific route, is called
    $klein->respond("articles", function($request, $response, $service, $app) {
    });
});

But the catch all route is never called. If I use $klein->with("/at", function () {});, the catch all route is called as well.

Does klein support using the OR operator for namespaces?

@Xenywest
Copy link

+1

@rystaf
Copy link

rystaf commented Oct 11, 2019

I'm finding that catch-all routes in namespaces don't support any parameters, not just specifically the OR operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants