I'm developing a REST API using PHP and Tonic. The framework has a fine feature which is the inference of the Content-Type based on the extension of the URI requested. In the case of the service I'm developing, it's important to know the full name of the requested file.
If I use the following code:
$this->request->uri;
For a URI such as http://service.com/image1.jpg, all I get is image1
.
I could get the information I need going straight through $_SERVER['REQUEST_URI']
, but I'd like to use the facilities of the framework for this (should there be any).
Also, I found the documentation pretty poor, so, any doc links will be appretiated as well. Thanks.