This commit is contained in:
SIMON_\Simon
2018-09-05 17:34:53 +02:00
parent ddaf517579
commit 34acb97743
7 changed files with 79 additions and 27 deletions

View File

@@ -48,6 +48,7 @@ abstract class Formatter {
* @return string The class name to instantiate in accord to the Accept header
*/
private static function getFormatFromHeader() {
return 'BSR\Lib\Formatter\Json';
if(isset($_SERVER['HTTP_ACCEPT'])) {
$formats = array_map(function($f) {
$parts = explode(';', $f);