當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Part::parse方法代碼示例

本文整理匯總了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');
        }
開發者ID:k7n4n5t3w4rt,項目名稱:SeeingSystem,代碼行數:16,代碼來源:text_add.class.php

示例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;
 }
開發者ID:peehaa,項目名稱:pitchblade,代碼行數:13,代碼來源:SegmentFactory.php

示例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);
 }
開發者ID:dapepe,項目名稱:tymio,代碼行數:31,代碼來源:mail.php


注:本文中的Part::parse方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。