PHP Класс Piwik\Plugins\PrivacyManager\PrivacyManager

Наследование: extends Piwik\Plugin
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$purgeDataOptions options for data purging feature array[configName => configSection]

Открытые методы

Метод Описание
__construct ( ) Constructor.
deleteLogData ( ) Deletes old log data based on the options set in the Deletelogs config section. This is a scheduled task and will only execute every N days. The number of days is determined by the delete_logs_schedule_lowest_interval config option.
deleteReportData ( ) Deletes old archived data (reports & metrics).
getAllMetricsToKeep ( ) Returns the names of metrics that should be kept when purging as they appear in archive tables.
getClientSideTranslationKeys ( &$translationKeys )
getDeleteIntervalInSeconds ( $deleteInterval )
getJsFiles ( &$jsFiles )
getPurgeDataSettings ( ) : array Returns the settings for the data purging feature.
getPurgeEstimate ( array $settings = null ) : array Returns an array describing what data would be purged if both log data & report purging is invoked.
hasReportBeenPurged ( Piwik\DataTable\DataTableInterface $dataTable ) : boolean Returns true if it is likely that the data for this report has been purged and if the user should be told about that.
installationFormInit ( Piwik\Plugins\Installation\FormDefaultSettings $form ) Customize the Installation "default settings" form.
installationFormSubmit ( Piwik\Plugins\Installation\FormDefaultSettings $form ) Process the submit on the Installation "default settings" form.
registerEvents ( )
savePurgeDataSettings ( array $settings ) Saves the supplied data purging settings.
setTrackerCacheGeneral ( &$cacheContent )
shouldReportBePurged ( integer $reportDateYear, integer $reportDateMonth, integer | Date $reportsOlderThan = null ) : boolean Returns true if a report with the given year & month should be purged or not.

Приватные методы

Метод Описание
getGoalMetricsToKeep ( ) Returns the goal metrics to keep when the 'delete_reports_keep_basic_metrics' config is set to 1.
getMaxGoalId ( )
getMetricsToKeep ( ) Returns the general metrics to keep when the 'delete_reports_keep_basic_metrics' config is set to 1.
shouldPurgeData ( $settings, $lastRanOption ) Returns true if one of the purge data tasks should run now, false if it shouldn't.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( )

deleteLogData() публичный Метод

If delete_logs_enable is set to 1, old data in the log_visit, log_conversion, log_conversion_item and log_link_visit_action tables is deleted. The following options can tweak this behavior: - delete_logs_older_than: The number of days after which log data is considered old.
public deleteLogData ( )

deleteReportData() публичный Метод

Archive tables are not optimized after, as that is handled by a separate scheduled task in CoreAdminHome. This is a scheduled task and will only execute every N days. The number of days is determined by the delete_logs_schedule_lowest_interval config option. If delete_reports_enable is set to 1, old archive data is deleted. The following config options can tweak this behavior: - delete_reports_older_than: The number of months after which archive data is considered old. The current month is not considered when applying this value. - delete_reports_keep_basic_metrics: If set to 1, keeps certain metric data. Right now, all metric data is kept. - delete_reports_keep_day_reports: If set to 1, keeps old daily reports. - delete_reports_keep_week_reports: If set to 1, keeps old weekly reports. - delete_reports_keep_month_reports: If set to 1, keeps old monthly reports. - delete_reports_keep_year_reports: If set to 1, keeps old yearly reports.
public deleteReportData ( )

getAllMetricsToKeep() публичный статический Метод

Returns the names of metrics that should be kept when purging as they appear in archive tables.
public static getAllMetricsToKeep ( )

getClientSideTranslationKeys() публичный Метод

public getClientSideTranslationKeys ( &$translationKeys )

getDeleteIntervalInSeconds() публичный Метод

public getDeleteIntervalInSeconds ( $deleteInterval )

getJsFiles() публичный Метод

public getJsFiles ( &$jsFiles )

getPurgeDataSettings() публичный статический Метод

Returns the settings for the data purging feature.
public static getPurgeDataSettings ( ) : array
Результат array

getPurgeEstimate() публичный статический Метод

The returned array maps table names with the number of rows that will be deleted. If the table name is mapped with -1, the table will be dropped.
public static getPurgeEstimate ( array $settings = null ) : array
$settings array The config options to use in the estimate. If null, the real options are used.
Результат array

hasReportBeenPurged() публичный статический Метод

In order for this function to return true, the following must also be true: - The data table for this report must either be empty or not have been fetched. - The period of this report is not a multiple period. - The date of this report must be older than the delete_reports_older_than config option.
public static hasReportBeenPurged ( Piwik\DataTable\DataTableInterface $dataTable ) : boolean
$dataTable Piwik\DataTable\DataTableInterface
Результат boolean

installationFormInit() публичный Метод

Customize the Installation "default settings" form.
public installationFormInit ( Piwik\Plugins\Installation\FormDefaultSettings $form )
$form Piwik\Plugins\Installation\FormDefaultSettings

installationFormSubmit() публичный Метод

Process the submit on the Installation "default settings" form.
public installationFormSubmit ( Piwik\Plugins\Installation\FormDefaultSettings $form )
$form Piwik\Plugins\Installation\FormDefaultSettings

registerEvents() публичный Метод

См. также: Piwik\Plugin::registerEvents
public registerEvents ( )

savePurgeDataSettings() публичный статический Метод

Saves the supplied data purging settings.
public static savePurgeDataSettings ( array $settings )
$settings array The settings to save.

setTrackerCacheGeneral() публичный Метод

public setTrackerCacheGeneral ( &$cacheContent )

shouldReportBePurged() публичный статический Метод

If reportsOlderThan is set to null or not supplied, this function will check if a report should be purged, based on existing configuration. In this case, if delete_reports_enable is set to 0, this function will return false.
public static shouldReportBePurged ( integer $reportDateYear, integer $reportDateMonth, integer | Date $reportsOlderThan = null ) : boolean
$reportDateYear integer The year of the report in question.
$reportDateMonth integer The month of the report in question.
$reportsOlderThan integer | Piwik\Date If an int, the number of months a report must be older than in order to be purged. If a date, the date a report must be older than in order to be purged.
Результат boolean

Описание свойств

$purgeDataOptions публичное статическое свойство

options for data purging feature array[configName => configSection]
public static $purgeDataOptions