formatter hardcoded not inferred from header

This commit is contained in:
Guillermo Dev
2018-10-09 00:08:59 +02:00
parent ae07e45d33
commit 46fbc39788

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() {
//TODO this is ugly
return 'BSR\Lib\Formatter\Json';
if(isset($_SERVER['HTTP_ACCEPT'])) {
$formats = array_map(function($f) {