function features_get_signature in Features 7
Same name and namespace in other branches
- 6 features.export.inc \features_get_signature()
- 7.2 features.export.inc \features_get_signature()
Wrapper around features_get_[storage] to return an md5hash of a normalized defaults/normal object array. Can be used to compare normal/default states of a module's component.
3 calls to features_get_signature()
- features_get_component_states in ./
features.export.inc - Retrieve an array of features/components and their current states.
- features_set_signature in ./
features.export.inc - Set the signature of a module/component pair in the codecache.
- features_update_6101 in ./
features.install - Update 6101: Set codestate signature for all features.
1 string reference to 'features_get_signature'
- features_update_6101 in ./
features.install - Update 6101: Set codestate signature for all features.
File
- ./
features.export.inc, line 545
Code
function features_get_signature($state = 'default', $module_name, $component, $reset = FALSE) {
switch ($state) {
case 'cache':
$codecache = variable_get('features_codecache', array());
return isset($codecache[$module_name][$component]) ? $codecache[$module_name][$component] : FALSE;
case 'default':
$objects = features_get_default($component, $module_name, TRUE, $reset);
break;
case 'normal':
$objects = features_get_normal($component, $module_name, $reset);
break;
}
if (!empty($objects)) {
$objects = (array) $objects;
_features_sanitize($objects);
return md5(_features_linetrim(features_var_export($objects)));
}
return FALSE;
}