function _restclient_filemode_file_name in RESTClient 7.2
restclient file name for the url call.
Parameters
$resource_path: path of the service all
$type: type of function called, GET, PUT etc
Return value
string md5 hashed file name with the type at the end.
2 calls to _restclient_filemode_file_name()
- restclient_filemode_fetch_response in ./
restclient.filemode.inc - Function to fetch a response from a file.
- restclient_filemode_save_response in ./
restclient.filemode.inc - Function to save the response of the curl call to a file.
File
- ./
restclient.filemode.inc, line 99 - Defines the restclient testing feature.
Code
function _restclient_filemode_file_name($resource_path, $header) {
//Get the hook
$optional = '';
$data = module_invoke_all('filemode_signature_alter');
foreach ($data as $argument) {
if (is_array($header[$argument])) {
$optional .= serialize($header[$argument]);
}
else {
$optional .= $header[$argument];
}
}
$path = $resource_path . '.' . $optional;
return md5($path);
}