bcosca/fatfree — pull request #258 by xfra35 (2013-02-07 15:14:56+00:00)
Title: NEW: Web->acceptable returns the acceptable media types

Here's a suggestion of a new method in the Web class which would help knowing the media types requested by the client ([Accept header](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)).

Usage:
```
$web=Web::instance();
//formats available in the current application:
$available=array('text/html','text/plain','application/json');

switch ($web->acceptable($available)) {
case 'application/json':
// generate json output here
break;
case 'text/plain':
// generate text output here
break;
case 'text/html':
default:
//generate HTML output here
}
```