You are here

function sharerich_load_service in Sharerich 7

Same name and namespace in other branches
  1. 7.3 sharerich.module \sharerich_load_service()
  2. 7.2 sharerich.module \sharerich_load_service()

Helper to load services from the disk.

2 calls to sharerich_load_service()
sharerich_admin_form_submit in ./sharerich.admin.inc
Implements sharerich_admin_form_submit().
sharerich_get_service_content in ./sharerich.module
Helper to get the service content from file or variables.

File

./sharerich.module, line 193

Code

function sharerich_load_service($service_name) {
  $dir = drupal_get_path('module', 'sharerich') . '/services';
  $service_name = $dir . '/' . $service_name . '.inc';
  if (file_exists($service_name)) {
    return file_get_contents($service_name);
  }
  return FALSE;
}