本文整理匯總了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);
}