Google News
logo
Slim Framework - Interview Questions
What is Route callbacks in Slim Framework?
Each routing method described above accepts a callback routine as its final argument. This argument can be any PHP callable, and by default it accepts three arguments.
 
* Request The first argument is a Psr\Http\Message\ServerRequestInterface object that represents the current HTTP request.
* Response The second argument is a Psr\Http\Message\ResponseInterface object that represents the current HTTP response.
* Arguments The third argument is an associative array that contains values for the current route’s named placeholders.
Advertisement