function restws_format in RESTful Web Services 7
Same name and namespace in other branches
- 7.2 restws.module \restws_format()
Returns an instance of a format.
Return value
RestWSFormatInterface A resource format object.
3 calls to restws_format()
- hook_restws_request_alter in ./
restws.api.php - Alter the incoming request array.
- restws_format_mimetype in ./
restws.module - Returns the format instance for a given MIME type.
- restws_page_callback in ./
restws.module - Menu page callback.
File
- ./
restws.module, line 96 - RESTful web services module.
Code
function restws_format($name) {
$static =& drupal_static(__FUNCTION__);
if (!isset($static[$name])) {
$info = restws_get_format_info();
$static[$name] = isset($info[$name]) ? new $info[$name]['class']($name, $info[$name]) : FALSE;
}
return $static[$name];
}