function tripal_load_include_web_service_class

3.x tripal_ws.api.inc tripal_load_include_web_service_class($class)

Loads the TripalWebService class file into scope.

Parameters

$class: The TripalWebService class to include.

Return value

TRUE if the field type class file was found, FALSE otherwise.

Related topics

3 calls to tripal_load_include_web_service_class()
TripalDocService_v0_1::__construct in tripal_ws/includes/TripalWebService/TripalDocService_v0_1.inc
Constructor for the TripalDocService_v0_1 class.
tripal_ws_get_services in tripal_ws/tripal_ws.module
The callback function for all RESTful web services.
tripal_ws_list_services in tripal_ws/tripal_ws.module
Generates the list of services as the "home page" for Tripal web services.

File

tripal_ws/api/tripal_ws.api.inc, line 97
This file provides the Tripal Web Services API: a set of functions for interacting with the Tripal Web Services.

Code

function tripal_load_include_web_service_class($class) {

  $modules = module_list(TRUE);
  foreach ($modules as $module) {
    $file_path = realpath(".") . '/' . drupal_get_path('module', $module) . '/includes/TripalWebService/' . $class . '.inc';
    if (file_exists($file_path)) {
      module_load_include('inc', $module, 'includes/TripalWebService/' . $class);
      if (class_exists($class)) {
        return TRUE;
      }
    }
  }
  return FALSE;
}