function services_server in Services 7
Same name and namespace in other branches
- 5 services.module \services_server()
- 6 services.module \services_server()
- 6.2 services.module \services_server()
Callback for server endpoint
1 string reference to 'services_server'
- services_menu in ./
services.module - Implements hook_menu().
File
- ./
services.module, line 118 - @author Services Dev Team
Code
function services_server($server_path = NULL) {
// Find which module the server is part of
foreach (module_implements('server_info') as $module) {
$info = module_invoke($module, 'server_info');
if ($info['#path'] == $server_path) {
// call the server
services_set_server_info($module);
print module_invoke($module, 'server');
// Do not let this output
module_invoke_all('exit');
exit;
}
}
// return 404 if the server doesn't exist
drupal_not_found();
}