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