public function ServicesYAMLFormatter::render in Services 7.3
Render data to the string.
Parameters
$data: Data to render
Return value
string
Overrides ServicesFormatterInterface::render
File
- servers/
rest_server/ includes/ ServicesFormatter.inc, line 92
Class
Code
public function render($data) {
if (($library = libraries_load('spyc')) && !empty($library['loaded'])) {
return Spyc::YAMLDump($data, 4, 60);
}
else {
watchdog('REST Server', 'Spyc library not found!', array(), WATCHDOG_ERROR);
return '';
}
}