/** * A PHP5-style constructor that can be used to perform common * class instantiation by children classes. * * @param array $aParams An array of parameters. The array should * be indexed by the name of object variables, * with the values that those variables should * be set to. For example, the parameter: * $aParams = array('foo' => 'bar') * would result in $this->foo = bar. */ function __construct($aParams) { // Set this page's entity/breakdown values $this->entity = 'campaign'; $this->breakdown = 'targeting-daily'; // Use the OA_Admin_Statistics_Daily helper class $this->useDailyClass = true; parent::__construct($aParams); // Special requirement for targeting statistics - activate required columns // in the plugins foreach (array_keys($this->aPlugins) as $key) { $this->aPlugins[$key]->_aFields['placement_required_impressions']['active'] = true; $this->aPlugins[$key]->_aFields['placement_requested_impressions']['active'] = true; $this->aPlugins[$key]->_aFields['placement_actual_impressions']['active'] = true; $this->aPlugins[$key]->_aFields['zones_forecast_impressions']['active'] = true; $this->aPlugins[$key]->_aFields['zones_actual_impressions']['active'] = true; $this->aPlugins[$key]->_aFields['target_ratio']['active'] = true; } }
/** * A private method that can be inherited and used by children classes to * calculate the total sum of all data rows, and store it in the * {@link $this->aTotal} array. * * Also sets {@link $this->showTotals} to true, if required. * * @access private * @param array $aRows An array of rows of statistics to summarise. */ function _summariseTotals(&$aRows) { parent::_summariseTotals($aRows); $this->_summarizeStats($this->aTotal); }