本文整理匯總了PHP中Pluf::pf方法的典型用法代碼示例。如果您正苦於以下問題:PHP Pluf::pf方法的具體用法?PHP Pluf::pf怎麽用?PHP Pluf::pf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pluf
的用法示例。
在下文中一共展示了Pluf::pf方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sendMail
/**
* Effectively sends the email.
*/
function sendMail()
{
if ($this->backend === null) {
$params = Pluf::pf('mail_', true);
// strip the prefix 'mail_'
unset($params['backend']);
$gmail = new Mail();
if (Pluf::f('mail_backend') == 'smtp') {
$params['persist'] = true;
}
$this->backend = $gmail->factory(Pluf::f('mail_backend', 'mail'), $params);
}
$body = $this->message->get();
$hdrs = $this->message->headers($this->headers);
if (Pluf::f('send_emails', true)) {
$this->backend->send($this->headers['To'], $hdrs, $body);
}
$this->message = new Mail_mime($this->crlf);
$this->message->_build_params['html_charset'] = $this->encoding;
$this->message->_build_params['text_charset'] = $this->encoding;
$this->message->_build_params['head_charset'] = $this->encoding;
$this->headers = array('From' => $this->from);
}
示例2: sendMail
/**
* Effectively sends the email.
*/
function sendMail()
{
$body = $this->message->get();
$hdrs = $this->message->headers($this->headers);
$params = Pluf::pf('mail_', true);
// strip the prefix 'mail_'
unset($params['backend']);
$gmail = new Mail();
$mail = $gmail->factory(Pluf::f('mail_backend', 'mail'), $params);
if (Pluf::f('send_emails', true)) {
$mail->send($this->to_address, $hdrs, $body);
}
if (defined('IN_UNIT_TESTS')) {
$GLOBALS['_PX_UNIT_TESTS']['emails'][] = array($this->to_address, $hdrs, $body);
}
}