|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<?php
|
|
|
|
|
namespace BSR\Webservice\Formatter;
|
|
|
|
|
namespace Bsr\Webservice\Formatter;
|
|
|
|
|
|
|
|
|
|
abstract class Formatter {
|
|
|
|
|
private static $formats = array();
|
|
|
|
|
@ -59,7 +59,7 @@ abstract class Formatter {
|
|
|
|
|
*/
|
|
|
|
|
private static function getFormatFromHeader() {
|
|
|
|
|
//TODO this is ugly
|
|
|
|
|
return 'BSR\Webservice\Formatter\Json';
|
|
|
|
|
return 'Bsr\Webservice\Formatter\Json';
|
|
|
|
|
if(isset($_SERVER['HTTP_ACCEPT'])) {
|
|
|
|
|
$formats = array_map(function($f) {
|
|
|
|
|
$parts = explode(';', $f);
|
|
|
|
|
@ -76,7 +76,7 @@ abstract class Formatter {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return 'BSR\Webservice\Formatter\Json';
|
|
|
|
|
return 'Bsr\Webservice\Formatter\Json';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|