PHP 클래스 Piwik\Plugins\PrivacyManager\PrivacyManager

상속: extends Piwik\Plugin
파일 보기 프로젝트 열기: piwik/piwik 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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