You are here

function restws_resource_controller in RESTful Web Services 7.2

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

Returns a instance of a resource controller.

Return value

RestWSResourceControllerInterface A resource controller object.

1 call to restws_resource_controller()
restws_handle_request in ./restws.module
Handles a request.

File

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

Code

function restws_resource_controller($name) {
  $static =& drupal_static(__FUNCTION__);
  if (!isset($static[$name])) {
    $info = restws_get_resource_info();
    $static[$name] = isset($info[$name]) ? new $info[$name]['class']($name, $info[$name]) : FALSE;
  }
  return $static[$name];
}