function services_auth_invoke in Services 6.2
Same name and namespace in other branches
- 6.3 services.runtime.inc \services_auth_invoke()
- 7.3 includes/services.runtime.inc \services_auth_invoke()
- 7 services.module \services_auth_invoke()
Invokes a method for the configured authentication module.
Parameters
string $method: The method to call.
mixed $arg1: Optional. First argument.
mixed $arg2: Optional. Second argument.
mixed $arg3: Optional. Third argument.
Return value
mixed
8 calls to services_auth_invoke()
- services_admin_browse_test in ./
services_admin_browse.inc - Build the form used for testing a service in the browser
- services_admin_browse_test_submit in ./
services_admin_browse.inc - Submit callback for services_admin_browse_test().
- services_admin_settings in ./
services_admin_browse.inc - Build the admin settings form.
- services_admin_settings_submit in ./
services_admin_browse.inc - Submit callback for services_admin_settings().
- services_delegate_access in ./
services.module - Should be removed. This code doesn't seem to be used anywhere.
File
- ./
services.module, line 308 - Provides a generic but powerful API for exposing web services.
Code
function services_auth_invoke($method, &$arg1 = NULL, &$arg2 = NULL, &$arg3 = NULL) {
$module = variable_get('services_auth_module', '');
// Get information about the current auth module
$func = services_auth_info($method, $module);
if ($func) {
if ($file = services_auth_info('file')) {
require_once drupal_get_path('module', $module) . '/' . $file;
}
if (is_callable($func)) {
$args = func_get_args();
// Replace method name and arg1 with reference to $arg1 and $arg2.
array_splice($args, 0, 3, array(
&$arg1,
&$arg2,
&$arg3,
));
return call_user_func_array($func, $args);
}
}
else {
return TRUE;
}
}