You are here

function restws_get_resource_info in RESTful Web Services 7.2

Same name and namespace in other branches
  1. 7 restws.module \restws_get_resource_info()

Returns info about all defined resources.

Parameters

string $resource: By default null, else the info for the given resource will be returned.

6 calls to restws_get_resource_info()
restws_menu_alter in ./restws.module
Implements hook_menu_alter().
restws_page_callback in ./restws.module
Menu page callback.
restws_permission in ./restws.module
Implements hook_permission().
restws_resource_controller in ./restws.module
Returns a instance of a resource controller.
restws_resource_uri in ./restws.module
Returns the URI used for the given resource.

... See full list

File

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

Code

function restws_get_resource_info($resource = NULL) {
  $info =& drupal_static(__FUNCTION__);
  if (!isset($info)) {
    $info = module_invoke_all('restws_resource_info');
    drupal_alter('restws_resource_info', $info);
  }
  if (!empty($resource)) {
    return $info[$resource];
  }
  return $info;
}