本文整理汇总了PHP中Part::parse方法的典型用法代码示例。如果您正苦于以下问题:PHP Part::parse方法的具体用法?PHP Part::parse怎么用?PHP Part::parse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Part
的用法示例。
在下文中一共展示了Part::parse方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: savePart
private function savePart()
{
$form = 'frost.views.cms.part.text.TextAdd';
$part = Part::addMediaToPart($form,'Text');
// Add the 'preview' to the part
$part = new Part();
$part->clauseSafe('part_id',Application::param('part_id'));
$part->parse();
$part->save();
//Part::setParttagsAndSave($part,Application::param('current_tags'));
Application::setParam('module_id',Application::param('module_id'));
Application::redirect('ModuleDetail');
}
示例2: build
/**
* Creates instances of segments
*
* @param string $rawValue The raw value of the segment
*
* @return \PitchBlade\Router\Path\Part The created segment
*/
public function build($rawValue)
{
$segment = new Part($rawValue);
$segment->parse();
return $segment;
}
示例3: parse
protected function parse($rawmessage)
{
parent::parse($rawmessage);
$headers = imap_rfc822_parse_headers($this->rawheader, self::INTERNAL_HOST);
if (isset($headers->udate)) {
$this->date = $headers->udate;
} else {
if (isset($headers->date) && ($date = \Zeyon\parseTime($headers->date)) !== null) {
$this->date = $date;
}
}
isset($headers->subject) and $this->subject = self::decodeHeader($headers->subject);
if (isset($headers->fromaddress)) {
$address = $headers->from[0];
$this->sender = self::decodeHeader($headers->fromaddress);
$this->sender_email = isset($address->mailbox, $address->host) ? "{$address->mailbox}@{$address->host}" : '';
$this->sender_name = isset($address->personal) ? self::decodeHeader($address->personal) : $this->sender_email;
}
if (isset($headers->toaddress)) {
$address = $headers->to[0];
$this->to = self::decodeHeader($headers->toaddress);
$this->to_email = isset($address->mailbox, $address->host) ? "{$address->mailbox}@{$address->host}" : '';
$this->to_name = isset($address->personal) ? self::decodeHeader($address->personal) : $this->to_email;
$this->to_count = count($headers->to);
}
isset($headers->ccaddress) and $this->cc = self::decodeHeader($headers->ccaddress);
isset($headers->bccaddress) and $this->bcc = self::decodeHeader($headers->bccaddress);
isset($headers->reply_toaddress) and $this->replyto = self::decodeHeader($headers->reply_toaddress);
$this->receipt = self::extractHeaderField($this->rawheader, 'Disposition-Notification-To') !== '' || self::extractHeaderField($this->rawheader, 'Return-Receipt-To') !== '';
$this->spam = strtolower(self::extractHeaderField($this->rawheader, 'X-Spam-Flag')) === 'yes' || preg_match('/^\\s*\\[spam\\]/i', $this->subject);
}