How to debug ArchiveProcessing in custom Plugin?

Hi!

is there any way to test a single ArchiveProcessing method without running archiving for all plugins?

I want to run myPlugin::archiveDay($notifcation) but I don’t have the $notification-parameter when I run it seperatly. How can I create my own $notification object to test my archiveDay-function?

Cheers!
Malte

You can create an archiveNotification object like this:


		$idSite = 7; 
		$period = 'day'; 
		$date = 'today'; 
		$segment = '';
		
		$archiveProcessing = new Piwik_ArchiveProcessing_Day();
		$archiveProcessing->setSite(new Piwik_Site($idSite));
		$archiveProcessing->setPeriod(Piwik_Period::advancedFactory($period, $date));
		$archiveProcessing->setSegment(new Piwik_Segment($segment, $idSite));
		$archiveProcessing->init(); 
		
		$notification = new Piwik_Event_Notification($archiveProcessing, '', array());
		
		Piwik_YourPlugin::archiveDay($notification);