/** * Returns total number of rows for the query. * * @param * * @return int Total number of rows * @access public */ function getTotalCount($action) { switch ($this->_event_type) { case 'queue': $event = new CRM_Mailing_Event_BAO_Queue(); return $event->getTotalCount($this->_mailing_id, $this->_job_id); break; case 'delivered': $event = new CRM_Mailing_Event_BAO_Delivered(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'opened': $event = new CRM_Mailing_Event_BAO_Opened(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'bounce': $event = new CRM_Mailing_Event_BAO_Bounce(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'forward': $event = new CRM_Mailing_Event_BAO_Forward(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'reply': $event = new CRM_Mailing_Event_BAO_Reply(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'unsubscribe': $event = new CRM_Mailing_Event_BAO_Unsubscribe(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'optout': $event = new CRM_Mailing_Event_BAO_Unsubscribe(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct, FALSE); break; case 'click': $event = new CRM_Mailing_Event_BAO_TrackableURLOpen(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct, $this->_url_id); break; default: return 0; } }
/** * Returns total number of rows for the query. * * @param * @return int Total number of rows * @access public */ function getTotalCount($action) { switch ($this->_event_type) { case 'queue': require_once 'CRM/Mailing/Event/BAO/Queue.php'; $event = new CRM_Mailing_Event_BAO_Queue(); return $event->getTotalCount($this->_mailing_id, $this->_job_id); break; case 'delivered': require_once 'CRM/Mailing/Event/BAO/Delivered.php'; $event = new CRM_Mailing_Event_BAO_Delivered(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'opened': require_once 'CRM/Mailing/Event/BAO/Opened.php'; $event = new CRM_Mailing_Event_BAO_Opened(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'bounce': require_once 'CRM/Mailing/Event/BAO/Bounce.php'; $event = new CRM_Mailing_Event_BAO_Bounce(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'forward': require_once 'CRM/Mailing/Event/BAO/Forward.php'; $event = new CRM_Mailing_Event_BAO_Forward(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'reply': require_once 'CRM/Mailing/Event/BAO/Reply.php'; $event = new CRM_Mailing_Event_BAO_Reply(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'unsubscribe': require_once 'CRM/Mailing/Event/BAO/Unsubscribe.php'; $event = new CRM_Mailing_Event_BAO_Unsubscribe(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct); break; case 'click': require_once 'CRM/Mailing/Event/BAO/TrackableURLOpen.php'; $event = new CRM_Mailing_Event_BAO_TrackableURLOpen(); return $event->getTotalCount($this->_mailing_id, $this->_job_id, $this->_is_distinct, $this->_url_id); break; default: return 0; } }