Class Dal_Statistics_AdServer

Description

The data access layer code for summarising raw data into statistics, for the AdServer module.

Located in /maintenance/libraries/max/Dal/StatisticsAdServer.php (line 43)

Dal
   |
   --Dal_Statistics_Common
      |
      --Dal_Statistics_AdServer
Direct descendents
Class Description
 class Dal_Statistics_AdServer_Split The data access layer code for summarising raw data into statistics, for
Method Summary
 Dal_Statistics_AdServer Dal_Statistics_AdServer ()
 void decrementCampaigns (string &$report, mixed $decrStart, Date $decrEnd, Date $sdecrStart)
 integer deleteOldData (Date $summarisedTo)
 Date getMaintenanceStatisticsLastRunInfo (integer $type, [Date $now = null])
 void logCompletion (Date $start, Date $end, integer $type, Date $updateTo, string &$report)
 void saveHistory (Date $start, Date $end)
 void saveIntermediate (Date $start, Date $end)
 void saveSummary (Date $start, Date $end)
 integer summariseClicks (Date $start, Date $end)
 integer summariseConnections (Date $start, Date $end)
 integer summariseImpressions (Date $start, Date $end)
 integer summariseRequests (Date $start, Date $end)
 Date _getMaintenanceStatisticsLastRunInfo (integer $type, string $rawTable, [Date $now = null])
Variables
Methods
Constructor Dal_Statistics_AdServer (line 51)

The constructor method.

Dal_Statistics_AdServer Dal_Statistics_AdServer ()
decrementCampaigns (line 1107)

A method to decrement the remaining impression, click and conversion targets of campaigns based on the saved, summarised data.

void decrementCampaigns (string &$report, mixed $decrStart, Date $decrEnd, Date $sdecrStart)
  • string $report: A reference to the report to be logged.
  • Date $sdecrStart: The date from which impressions, clicks and conversions should be used to decrement the campaign targets.
  • Date $decrEnd: The date up to which impressions, clicks and conversions should be used to decrement the campaign targets.
deleteOldData (line 1362)

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

  • return: The number of rows 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).

Redefinition of:
Dal_Statistics_Common::deleteOldData()
A method to delete old (ie. summarised) raw data.

Redefined in descendants as:
getMaintenanceStatisticsLastRunInfo (line 88)

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, [Date $now = null])
  • 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.
  • Date $now: An optional Date, used to specify the "current time", and to limit the method to only look for past maintenance statistics runs before this date. Normally only used to assist with re-generation of statistics in the event of faulty raw tables.

Redefinition of:
Dal_Statistics_Common::getMaintenanceStatisticsLastRunInfo()
A method to find the last time that maintenance statistics was run.

Redefined in descendants as:
logCompletion (line 1433)

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.

Redefinition of:
Dal_Statistics_Common::logCompletion()
A method to store the details logging a maintenance statistics run.
saveHistory (line 990)

A method to update the zone impression history table from the intermediate tables.

void saveHistory (Date $start, Date $end)
  • Date $start: The start date/time to update from.
  • Date $end: The end date/time to update to.
saveIntermediate (line 638)

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.

Redefinition of:
Dal_Statistics_Common::saveIntermediate()
A method to update the intermediate tables with summarised data.
saveSummary (line 1056)

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

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

Redefinition of:
Dal_Statistics_Common::saveSummary()
A method to update the summary table from the intermediate tables.
singleton (line 62)

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

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

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

Redefined in descendants as:
summariseClicks (line 299)

A method for summarising clicks into a temporary table.

  • return: The number of click 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.

Redefinition of:
Dal_Statistics_Common::summariseClicks()
A method for summarising clicks into a temporary table.

Redefined in descendants as:
summariseConnections (line 355)

A method for summarising connections into a temporary table.

  • return: The number of connection rows 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.

Redefinition of:
Dal_Statistics_Common::summariseConnections()
A method for summarising connections into a temporary table.

Redefined in descendants as:
summariseImpressions (line 243)

A method for summarising impressions into a temporary table.

  • return: The number of impression 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.

Redefinition of:
Dal_Statistics_Common::summariseImpressions()
A method for summarising impressions into a temporary table.

Redefined in descendants as:
summariseRequests (line 187)

A method for summarising requests into a temporary table.

  • return: The number of request rows summarised.
integer summariseRequests (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:
_getMaintenanceStatisticsLastRunInfo (line 117)

A private function to do the job of Dal_Statistics_Search::getMaintenanceStatisticsLastRunInfo(), but with an extra parameter to specify the raw table to look in, in the case of maintenance statistics not having been run before.

  • 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.
  • private:
Date _getMaintenanceStatisticsLastRunInfo (integer $type, string $rawTable, [Date $now = null])
  • 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.
  • string $rawTable: The raw table to use in case of no previous run.
  • Date $now: An optional Date, used to specify the "current time", and to limit the method to only look for past maintenance statistics runs before this date. Normally only used to assist with re-generation of statistics in the event of faulty raw tables.
_saveConnectionsAndVariableValues (line 855)

A private method to save the tacker impression/ad impression and tracker impression/ad click connections that have been marked as "latest", and also save the associated tracker impression variable values.

  • private:
void _saveConnectionsAndVariableValues (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:

Inherited Methods

Inherited From Dal_Statistics_Common

 Dal_Statistics_Common::Dal_Statistics_Common()
 Dal_Statistics_Common::deleteOldData()
 Dal_Statistics_Common::getMaintenanceStatisticsLastRunInfo()
 Dal_Statistics_Common::logCompletion()
 Dal_Statistics_Common::saveIntermediate()
 Dal_Statistics_Common::saveSummary()
 Dal_Statistics_Common::singleton()
 Dal_Statistics_Common::summariseClicks()
 Dal_Statistics_Common::summariseConnections()
 Dal_Statistics_Common::summariseImpressions()

Inherited From Dal

 Dal::Dal()
 Dal::affectedRows()
 Dal::execute()
 Dal::executeIgnoreErrors()
 Dal::fetchResultAsArray()
 Dal::numberOfRows()
 Dal::singleton()

Documentation generated on Fri, 24 Dec 2004 13:03:33 +0000 by phpDocumentor 1.3.0RC3