Overview Overview Each Slim application instance has one request object. The request object is an abstraction of the currentHTTP request and allows you to easily interact with ...
A Slim application provides built-in support for HTTP caching using ETags. An ETag is a unique identifier for aresource URI. When an ETag header is set with the Slim applica...
Paths Root URI Resource URI Paths Every HTTP request received by a Slim application will have a root URI and a resource URI. Root URI The root URI is the physical URL pat...
PATCH PATCH Use the Slim application’s patch() method to map a callback function to a resource URI that is requested withthe HTTP PATCH method. <? php $app = new \Slim\...
Headers Headers A Slim application will automatically parse all HTTP request headers. You can access the request headers using therequest object’s public headers property. The...
Debug Debug You can enable debugging during application instantiation with this setting: <? php $app = new \Slim\Slim ( array ( 'debug' => true )); Y...
Overview Important Notes Overview Let’s face it: sometimes things go wrong. It is important to intercept errors and respond to them appropriately. ASlim application provides h...
Writers How to use a custom log writer Writers The Slim application’s log object has a log writer. The log writer is responsible for sending a logged message tothe appropriate...
Custom One route, multiple HTTP methods One route, custom http methods Custom One route, multiple HTTP methods Sometimes you may need a route to respond to multiple HTTP me...
Routing How to create routes GET Route POST Route PUT Route DELETE Route OPTIONS Route PATCH Route Any Route Custom Route Route callbacks Writing content to the response ...