/** * The constructor method. */ function OA_Maintenance_Priority_AdServer_Task_ForecastZoneImpressions() { parent::OA_Maintenance_Priority_AdServer_Task(); // Store the configuration array $this->aConf = $GLOBALS['_MAX']['CONF']; // Store the current date/time $this->oDateNow = $this->getDateNow(); // Set the date to update ZIF values until - that is, the end of the // current operation interval $aDates = OX_OperationInterval::convertDateToOperationIntervalStartAndEndDates($this->oDateNow); $this->oUpdateToDate = $aDates['end']; // Obtain the information about the last MSE run $aData = $this->oDal->getMaintenanceStatisticsLastRunInfo(); $this->oStatisticsUpdatedToDate = is_null($aData['updated_to']) ? null : new Date($aData['updated_to']); // Obtain the information about the last MPE run $aData = $this->oDal->getMaintenancePriorityLastRunInfo(DAL_PRIORITY_UPDATE_ZIF); $this->oPriorityUpdatedToDate = is_null($aData['updated_to']) ? null : new Date($aData['updated_to']); $this->priorityOperationInterval = $aData['operation_interval']; // Prepare the list of all active zones in the system $this->aActiveZoneIDs = $this->_getActiveZonesIDs(); // Set other zone ID arrays to empty arrays $this->aNewZoneIDs = array(); $this->aRecentZoneIDs = array(); // Set the results arrays to an empty arrays $this->aForecastResults = array(); $this->aPastForecastResults = array(); // Set the default forecast value $multiplier = $this->aConf['maintenance']['operationInterval'] / 60; $this->ZONE_FORECAST_DEFAULT_ZONE_IMPRESSIONS = (int) round(ZONE_FORECAST_DEFAULT_ZONE_IMPRESSIONS * $multiplier); if ($this->ZONE_FORECAST_DEFAULT_ZONE_IMPRESSIONS < ZONE_FORECAST_DEFAULT_ZONE_IMPRESSIONS_MINIMUM) { $this->ZONE_FORECAST_DEFAULT_ZONE_IMPRESSIONS = ZONE_FORECAST_DEFAULT_ZONE_IMPRESSIONS_MINIMUM; } }
/** * The constructor method. */ function __construct() { parent::__construct(); $this->table =& $this->_getMaxTablePriorityObj(); }
/** * The constructor method. */ function OA_Maintenance_Priority_AdServer_Task_AllocateZoneImpressions() { parent::OA_Maintenance_Priority_AdServer_Task(); $this->table =& $this->_getMaxTablePriorityObj(); }
/** * The class constructor method. * * @return OA_Maintenance_Priority_Common_Task_GetRequiredAdImpressions */ function __construct() { parent::__construct(); $this->oTable =& $this->_getMaxTablePriorityObj(); $this->currentTz = new Date_TimeZone('UTC'); }
/** * The class constructor method. * * @return OA_Maintenance_Priority_Common_Task_GetRequiredAdImpressions */ function OA_Maintenance_Priority_Common_Task_GetRequiredAdImpressions() { parent::OA_Maintenance_Priority_AdServer_Task(); $this->aZoneForecasts = array(); $this->oTable =& $this->_getMaxTablePriorityObj(); }