function messaging_array_info in Messaging 7
Same name and namespace in other branches
- 6.4 messaging.module \messaging_array_info()
- 6.3 messaging.module \messaging_array_info()
Get information from an array of data
Parameters
$data: Array of data indexed by type
$type: Type to return out of the array, none to return all types
$property: Property to return, none to return all properties
$default: Default value to return if not property set
2 calls to messaging_array_info()
- messaging_address_info in ./
messaging.module - Returns messaging address properties
- messaging_method_info in ./
messaging.module - Returns messaging methods properties
File
- ./
messaging.module, line 558
Code
function messaging_array_info($data, $type = NULL, $property = NULL, $default = NULL) {
if ($type && $property) {
return isset($data[$type][$property]) ? $data[$type][$property] : $default;
}
elseif ($type) {
return isset($data[$type]) ? $data[$type] : array();
}
elseif ($property) {
return messaging_array_list($data, $property, FALSE, $default);
}
else {
return $data;
}
}