Ejemplo n.º 1
0
 /**
  * This method returns publisher statistics for an agency for a specified period.
  *
  * @access public
  *
  * @param integer $agencyId The ID of the agency to view statistics for
  * @param date $oStartDate The date from which to get statistics (inclusive)
  * @param date $oEndDate The date to which to get statistics (inclusive)
  * @param array &$rsStatisticsData The data returned by the function
  * <ul>
  *   <li><b>publisherID integer</b> The ID of the publisher
  *   <li><b>publisherName string (255)</b> The name of the publisher
  *   <li><b>requests integer</b> The number of requests for the day
  *   <li><b>impressions integer</b> The number of impressions for the day
  *   <li><b>clicks integer</b> The number of clicks for the day
  *   <li><b>revenue decimal</b> The revenue earned for the day
  * </ul>
  *
  * @return boolean  True if the operation was successful and false if not.
  *
  */
 function getAgencyPublisherStatistics($agencyId, $oStartDate, $oEndDate, $localTZ, &$rsStatisticsData)
 {
     if (!$this->checkPermissions(array(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER), 'agency', $agencyId)) {
         return false;
     }
     if ($this->_validateForStatistics($agencyId, $oStartDate, $oEndDate)) {
         $dalAgency = new OA_Dal_Statistics_Agency();
         $rsStatisticsData = $dalAgency->getAgencypublisherStatistics($agencyId, $oStartDate, $oEndDate, $localTZ);
         return true;
     } else {
         return false;
     }
 }