You are here

function hook_wsclient_rest_formatter_info in Web service client 7

Provide the formatter for handling requests and parsing responses.

Return value

array An array whose keys are classes implementing HttpClientFormatter interface and whose values are arrays containing the keys:

  • label: A human readable, translated label for the formatter.
  • format: Format of the formatter. Is used to group the formatters.
  • settings: An array, containing the settings of the formatter. The key is the setting name, the value is the default value of the setting.

Related topics

1 function implements hook_wsclient_rest_formatter_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

wsclient_rest_wsclient_rest_formatter_info in wsclient_rest/wsclient_rest.module
Implements hook_wsclient_rest_formatter_info().
3 invocations of hook_wsclient_rest_formatter_info()
WsclientRestXMLFormatter::formAlter in wsclient_rest/wsclient_rest.inc
wsclient_rest_formatters_as_options in wsclient_rest/wsclient_rest.module
Returns a list of formatters, suitable for use as form options.
wsclient_rest_has_custom_formatter in wsclient_rest/wsclient_rest.module
Determines whether custom formatter is defined in settings: "custom" means that it implements the HttpClientFormatter interface but has no corresponding implementation in info hook.

File

wsclient_rest/wsclient_rest.api.php, line 45
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_wsclient_rest_formatter_info() {
  return array(
    'WslientRestJSONFormatter' => array(
      'label' => t('Basic JSON formatter'),
      'format' => t('JSON'),
      'settings' => array(),
    ),
  );
}