本文整理汇总了PHP中CRM_Mailing_Event_BAO_Bounce::getTotalCount方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Mailing_Event_BAO_Bounce::getTotalCount方法的具体用法?PHP CRM_Mailing_Event_BAO_Bounce::getTotalCount怎么用?PHP CRM_Mailing_Event_BAO_Bounce::getTotalCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Mailing_Event_BAO_Bounce
的用法示例。
在下文中一共展示了CRM_Mailing_Event_BAO_Bounce::getTotalCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: civicrm_api3_mailing_stats
/**
* Function which needs to be explained.
*
* @param array $params
*
* @return array
* @throws \API_Exception
*/
function civicrm_api3_mailing_stats($params)
{
civicrm_api3_verify_mandatory($params, 'CRM_Mailing_DAO_MailingJob', array('mailing_id'), FALSE);
if ($params['date'] == 'now') {
$params['date'] = date('YmdHis');
} else {
$params['date'] = CRM_Utils_Date::processDate($params['date'] . ' ' . $params['date_time']);
}
$stats[$params['mailing_id']] = array();
if (empty($params['job_id'])) {
$params['job_id'] = NULL;
}
foreach (array('Delivered', 'Bounces', 'Unsubscribers', 'Unique Clicks', 'Opened') as $detail) {
switch ($detail) {
case 'Delivered':
$stats[$params['mailing_id']] += array($detail => CRM_Mailing_Event_BAO_Delivered::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']));
break;
case 'Bounces':
$stats[$params['mailing_id']] += array($detail => CRM_Mailing_Event_BAO_Bounce::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']));
break;
case 'Unsubscribers':
$stats[$params['mailing_id']] += array($detail => CRM_Mailing_Event_BAO_Unsubscribe::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']));
break;
case 'Unique Clicks':
$stats[$params['mailing_id']] += array($detail => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, NULL, $params['date']));
break;
case 'Opened':
$stats[$params['mailing_id']] += array($detail => CRM_Mailing_Event_BAO_Opened::getTotalCount($params['mailing_id'], $params['job_id'], FALSE, $params['date']));
break;
}
}
return civicrm_api3_create_success($stats);
}
示例2: getTotalCount
/**
* 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;
}
}
示例3: getTotalCount
/**
* 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;
}
}