You are here

function shurly_service_output in ShURLy 6

Same name and namespace in other branches
  1. 8 shurly_service/shurly_service.inc \shurly_service_output()
  2. 7 shurly_service/shurly_service.inc \shurly_service_output()

Output data in a given format

3 calls to shurly_service_output()
shurly_service_expand in shurly_service/shurly_service.inc
Callback for shurly/api/shorten
shurly_service_get_key in shurly_service/shurly_service.inc
shurly_service_shorten in shurly_service/shurly_service.inc
Callback for shurly/api/shorten

File

shurly_service/shurly_service.inc, line 121
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');
  }
}