function shurly_service_output in ShURLy 7
Same name and namespace in other branches
- 8 shurly_service/shurly_service.inc \shurly_service_output()
- 6 shurly_service/shurly_service.inc \shurly_service_output()
Output data in a given format
2 calls to shurly_service_output()
- shurly_service_expand in shurly_service/
shurly_service.inc - Callback for shurly/api/shorten
- shurly_service_shorten in shurly_service/
shurly_service.inc - Callback for shurly/api/shorten
File
- shurly_service/
shurly_service.inc, line 82 - Link general search functionalities to services module.
Code
function shurly_service_output($data, $input) {
$format = $input['format'] ? $input['format'] : 'json';
if (function_exists('shurly_service_output_' . $format)) {
call_user_func('shurly_service_output_' . $format, $data, $input);
}
else {
print t('invalid format request');
}
}