Content-Negotiation with the help of Renderer and Formatters

This commit is contained in:
Gilles Crettenand
2015-06-02 02:02:40 +02:00
parent c0159f4b79
commit 7e0a38e989
7 changed files with 241 additions and 23 deletions

17
Lib/Formatter/Xml.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
namespace BSR\Lib\Formatter;
class Xml extends Formatter {
protected static function init() {
self::registerFormats(array(
'text/xml',
'application/xml',
'application/x-xml',
));
}
public function render($data) {
throw new \RuntimeException('Not implemented yet.');
}
}