emitter is always defined and it should stop script execution after emitting otherwise it tries to match more services.
For example:
$restapi->get('/ping', function() {
return 'Pong';
});
// here we authorize - check for token
$restapi->authorize();
if I request service /ping, then it also tries to authorize, but it should stop script execution as soon as /ping service is matched and response is emitted.
emitter is always defined and it should stop script execution after emitting otherwise it tries to match more services.
For example:
if I request service /ping, then it also tries to authorize, but it should stop script execution as soon as /ping service is matched and response is emitted.