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?
I am trying to use namespaces for multiple countries and use the country to setup a service.
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?