You are here

function restws_restws_format_info in RESTful Web Services 7

Same name and namespace in other branches
  1. 7.2 restws.module \restws_restws_format_info()

Implements hook_restws_format_info().

Provides basic formats.

File

./restws.module, line 67
RESTful web services module.

Code

function restws_restws_format_info() {
  $result = array(
    'json' => array(
      'label' => t('JSON'),
      'class' => 'RestWSFormatJSON',
      'mime type' => 'application/json',
    ),
    'xml' => array(
      'label' => t('XML'),
      'class' => 'RestWSFormatXML',
      'mime type' => 'application/xml',
    ),
  );
  if (module_exists('rdf')) {
    $result['rdf'] = array(
      'label' => t('RDF'),
      'class' => 'RestWSFormatRDF',
      'mime type' => 'application/rdf+xml',
    );
  }
  return $result;
}