You are here

function health_api_callback in Health Status 7

Health API callback.

This callback will return differing results based on the $method. A valid $method could be json, drush, print_r, var_export, print. Other modules can hook into and add their own methods.

Parameters

string $method: A return method.

1 string reference to 'health_api_callback'
health_menu in ./health.module
Implements hook_menu().

File

./health.service.inc, line 63
Contains functions related to getting/showing data in the API.

Code

function health_api_callback($method) {
  $health_data = health_api_get_data();
  $results = module_invoke_all("health_api_callback_" . $method, $health_data);
  foreach ($results as $r) {
    print $r;
  }
}