Content-Negotiation with the help of Renderer and Formatters
This commit is contained in:
13
Lib/Formatter/Text.php
Normal file
13
Lib/Formatter/Text.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace BSR\Lib\Formatter;
|
||||
|
||||
class Text extends Formatter {
|
||||
protected static function init() {
|
||||
self::registerFormats(array('text/plain'));
|
||||
}
|
||||
|
||||
public function render($data) {
|
||||
print_r($data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user