function KalturaNotificationClient::splitMultiNotifications in Kaltura 6
Same name and namespace in other branches
- 5 kaltura_client/kaltura_notification_client.php \KalturaNotificationClient::splitMultiNotifications()
- 6.2 kaltura_client/kaltura_notification_client.php \KalturaNotificationClient::splitMultiNotifications()
- 7.3 kaltura_client/kaltura_notification_client.php \KalturaNotificationClient::splitMultiNotifications()
- 7.2 kaltura_client/kaltura_notification_client.php \KalturaNotificationClient::splitMultiNotifications()
1 call to KalturaNotificationClient::splitMultiNotifications()
File
- kaltura_client/
kaltura_notification_client.php, line 47
Class
Code
function splitMultiNotifications($data) {
$not_data = array();
foreach ($data as $name => $value) {
$match = preg_match("/^(not[^_]*)_(.*)\$/", $name, $parts);
if (!$match) {
continue;
}
$not_name_parts = $parts[1];
$not_property = @$parts[2];
$num = (int) str_replace('not', '', $not_name_parts);
$not_data[$num][$not_property] = $value;
}
return $not_data;
}