本文整理汇总了PHP中Swift_Message::getPriority方法的典型用法代码示例。如果您正苦于以下问题:PHP Swift_Message::getPriority方法的具体用法?PHP Swift_Message::getPriority怎么用?PHP Swift_Message::getPriority使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Swift_Message
的用法示例。
在下文中一共展示了Swift_Message::getPriority方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPriorityIsAdjustedIfSetTooHighOrLow
/**
* The maximum range for the priority is 1-5.
*/
public function testPriorityIsAdjustedIfSetTooHighOrLow()
{
for ($i = -10; $i < 1; $i++) {
$msg = new Swift_Message();
$msg->setPriority($i);
$this->assertEqual(Swift_Message::PRIORITY_HIGH, $msg->getPriority());
$structure = $msg->build()->readFull();
$this->assertPattern("~X-Priority: 1\r\nX-MSMail-Priority: High~s", $structure);
}
for ($i = 15; $i > 5; $i--) {
$msg = new Swift_Message();
$msg->setPriority($i);
$this->assertEqual(Swift_Message::PRIORITY_LOW, $msg->getPriority());
$structure = $msg->build()->readFull();
$this->assertPattern("~X-Priority: 5\r\nX-MSMail-Priority: Low~s", $structure);
}
}
示例2: getPriority
/**
* {@inheritdoc}
*/
public function getPriority()
{
return $this->message->getPriority();
}