本文整理汇总了PHP中Support::getEmailBySequence方法的典型用法代码示例。如果您正苦于以下问题:PHP Support::getEmailBySequence方法的具体用法?PHP Support::getEmailBySequence怎么用?PHP Support::getEmailBySequence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Support
的用法示例。
在下文中一共展示了Support::getEmailBySequence方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getEmail
/**
* @param int $issue_id
* @param int $email_id
* @return array
* @access protected
*/
public function getEmail($issue_id, $email_id)
{
if ($email_id == 0) {
// return issue description instead
$issue = Issue::getDetails($issue_id);
$email = array('sup_date' => $issue['iss_created_date'], 'sup_from' => $issue['reporter'], 'sup_to' => '', 'recipients' => '', 'sup_cc' => '', 'sup_has_attachment' => 0, 'sup_subject' => $issue['iss_summary'], 'message' => $issue['iss_original_description'], 'seb_full_email' => $issue['iss_original_description']);
} else {
$email = Support::getEmailBySequence($issue_id, $email_id);
}
// get requested email
if (count($email) < 1 || !is_array($email)) {
throw new RemoteApiException('Email #' . $email_id . " does not exist for issue #{$issue_id}");
}
return $email;
}
示例2: getEmail
function getEmail($p)
{
$email = XML_RPC_decode($p->getParam(0));
$password = XML_RPC_decode($p->getParam(1));
$auth = authenticate($email, $password);
if (is_object($auth)) {
return $auth;
}
$issue_id = XML_RPC_decode($p->getParam(2));
$email_id = XML_RPC_decode($p->getParam(3));
$email = Support::getEmailBySequence($issue_id, $email_id);
// get requested email
if (count($email) < 1 || !is_array($email)) {
return new XML_RPC_Response(0, $XML_RPC_erruser + 1, "Email #" . $email_id . " does not exist for issue #{$issue_id}");
}
// since xml-rpc has issues, lets base64 encode everything
foreach ($email as $key => $val) {
$email[$key] = base64_encode($val);
}
return new XML_RPC_Response(XML_RPC_Encode($email));
}