Abstract Class Dal_Statistics_Common

Description

An abstract class that defines the interface and some common methods for the data access layer code for summarising raw data into statistics, for all Max modules.

  • abstract:

Located in /maintenance/libraries/max/Dal/StatisticsCommon.php (line 46)

Dal
   |
   --Dal_Statistics_Common
Direct descendents
Class Description
 class Dal_Statistics_AdServer The data access layer code for summarising raw data into statistics, for the AdServer module.
Variable Summary
 mixed $tables
 mixed $tempTables
Method Summary
 Dal_Statistics_Common Dal_Statistics_Common ()
 integer deleteOldData (Date $summarisedTo)
 void logCompletion (Date $start, Date $end, integer $type, Date $updateTo, string &$report)
 void saveIntermediate (Date $start, Date $end)
 void saveSummary (Date $from)
 integer summariseClicks (Date $start, Date $end)
 integer summariseConnections (Date $start, Date $end)
 integer summariseImpressions (Date $start, Date $end)
 bool _checkIntervalDates (Date $start, Date $end)
Variables
mixed $tables (line 48)
mixed $tempTables (line 49)

Inherited Variables

Inherited from Dal

Dal::$conf
Dal::$dbConnection
Methods
Constructor Dal_Statistics_Common (line 56)

The constructor method.

Dal_Statistics_Common Dal_Statistics_Common ()
deleteOldData (line 137)

A method to delete old (ie. summarised) raw data.

  • return: The number of conversions deleted.
integer deleteOldData (Date $summarisedTo)
  • Date $summarisedTo: The date/time up to which data have been summarised (i.e. data up to and including this date (minus any compact_stats_grace window) will be deleted, unless required by the tracking module, where installed).

Redefined in descendants as:
getMaintenanceStatisticsLastRunInfo (line 84)

A method to find the last time that maintenance statistics was run.

  • return: A Date representing the date up to which the statistics have been summarised, for the specified update type, or the appropriate date based on raw data if maintenance statistics has never been run for the Max module before. Returns null if no raw data is available.
Date getMaintenanceStatisticsLastRunInfo (integer $type)
  • integer $type: The update type that occurred - that is, 0 if the update was done on the basis of the operation interval, or 1 if the update was done on the basis of the hour.

Redefined in descendants as:
logCompletion (line 154)

A method to store the details logging a maintenance statistics run.

void logCompletion (Date $start, Date $end, integer $type, Date $updateTo, string &$report)
  • Date $start: The time that the maintenance statistics run started.
  • Date $end: The time that the maintenance statistics run ended.
  • integer $type: The type of run:
    1. - The update was based on the operation interval;
    2. - The update was based on the hour;
    3. - The update was based on both the operation interval and hour.
  • Date $updateTo: The end of the operation interval/hour that has been updated.
  • string $report: The maintenance statistics run report.

Redefined in descendants as:
saveIntermediate (line 119)

A method to update the intermediate tables with summarised data.

void saveIntermediate (Date $start, Date $end)
  • Date $start: The start date/time to save from.
  • Date $end: The end date/time to save to.

Redefined in descendants as:
saveSummary (line 126)

A method to update the summary table from the intermediate tables.

void saveSummary (Date $from)
  • Date $from: Update using data after this date.

Redefined in descendants as:
singleton (line 69)

The singleton method to create or return a single instance of the class.

  • return: The returned Dal_Statistics_Common object.
  • static:
Dal_Statistics_Common &singleton ()

Redefinition of:
Dal::singleton()
The singleton method to create or return a single instance of the class.

Redefined in descendants as:
summariseClicks (line 102)

A method for summarising clicks into a temporary table.

  • return: The number of conversion rows summarised.
integer summariseClicks (Date $start, Date $end)
  • Date $start: The start date/time to summarise from.
  • Date $end: The end date/time to summarise to.

Redefined in descendants as:
summariseConnections (line 111)

A method for summarising connections into a temporary table.

  • return: The number of connections summarised.
integer summariseConnections (Date $start, Date $end)
  • Date $start: The start date/time to summarise from.
  • Date $end: The end date/time to summarise to.

Redefined in descendants as:
summariseImpressions (line 93)

A method for summarising impressions into a temporary table.

  • return: The number of conversion rows summarised.
integer summariseImpressions (Date $start, Date $end)
  • Date $start: The start date/time to summarise from.
  • Date $end: The end date/time to summarise to.

Redefined in descendants as:
_checkIntervalDates (line 167)

A private method to check that two Dates represent either the start and end of an operation interval, if the operation interval is less than an hour, or the start and end of an hour otherwise.

  • return: Returns true if the dates are correct interval start/end dates, false otherwise.
  • private:
bool _checkIntervalDates (Date $start, Date $end)
  • Date $start: The interval start date.
  • Date $end: The interval end date.

Inherited Methods

Inherited From Dal

 Dal::Dal()
 Dal::execute()
 Dal::executeIgnoreErrors()
 Dal::singleton()

Documentation generated on Fri, 3 Dec 2004 12:27:40 +0000 by phpDocumentor 1.3.0RC3