PHP Class Piwik\Plugins\CoreAdminHome\API

Inheritance: extends Piwik\Plugin\API
Show file Open project: piwik/piwik Class Usage Examples

Public Methods

Method Description
__construct ( Piwik\Scheduler\Scheduler $scheduler, Piwik\Archive\ArchiveInvalidator $invalidator )
invalidateArchivedReports ( string $idSites, string $dates, string | boolean $period = false, string | boolean $segment = false, boolean $cascadeDown = false ) : array Invalidates report data, forcing it to be recomputed during the next archiving run.
runCronArchiving ( ) Initiates cron archiving via web request.
runScheduledTasks ( ) : array Will run all scheduled tasks due to run at this time.
setArchiveSettings ( $enableBrowserTriggerArchiving, $todayArchiveTimeToLive )
setBrandingSettings ( $useCustomLogo )
setTrustedHosts ( $trustedHosts )

Private Methods

Method Description
getDatesToInvalidateFromString ( array $dates ) : Date[] Ensure the specified dates are valid.

Method Details

__construct() public method

public __construct ( Piwik\Scheduler\Scheduler $scheduler, Piwik\Archive\ArchiveInvalidator $invalidator )
$scheduler Piwik\Scheduler\Scheduler
$invalidator Piwik\Archive\ArchiveInvalidator

invalidateArchivedReports() public method

Note: This is done automatically when tracking or importing visits in the past.
public invalidateArchivedReports ( string $idSites, string $dates, string | boolean $period = false, string | boolean $segment = false, boolean $cascadeDown = false ) : array
$idSites string Comma separated list of site IDs to invalidate reports for.
$dates string Comma separated list of dates of periods to invalidate reports for.
$period string | boolean The type of period to invalidate: either 'day', 'week', 'month', 'year', 'range'. The command will automatically cascade up, invalidating reports for parent periods as well. So invalidating a day will invalidate the week it's in, the month it's in and the year it's in, since those periods will need to be recomputed too.
$segment string | boolean Optional. The segment to invalidate reports for.
$cascadeDown boolean If true, child periods will be invalidated as well. So if it is requested to invalidate a month, then all the weeks and days within that month will also be invalidated. But only if this parameter is set.
return array

runCronArchiving() public method

Initiates cron archiving via web request.
public runCronArchiving ( )

runScheduledTasks() public method

Will run all scheduled tasks due to run at this time.
public runScheduledTasks ( ) : array
return array

setArchiveSettings() public method

public setArchiveSettings ( $enableBrowserTriggerArchiving, $todayArchiveTimeToLive )

setBrandingSettings() public method

public setBrandingSettings ( $useCustomLogo )

setTrustedHosts() public method

public setTrustedHosts ( $trustedHosts )