当前位置: 首页>>代码示例>>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;未经允许,请勿转载。