当前位置: 首页>>代码示例>>PHP>>正文


PHP rcube::get_storage方法代码示例

本文整理汇总了PHP中rcube::get_storage方法的典型用法代码示例。如果您正苦于以下问题:PHP rcube::get_storage方法的具体用法?PHP rcube::get_storage怎么用?PHP rcube::get_storage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rcube的用法示例。


在下文中一共展示了rcube::get_storage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: list

 /**
  * __construct
  *
  * Provide a uid, and parse message structure.
  *
  * @param string $uid    The message UID.
  * @param string $folder Folder name
  *
  * @see self::$app, self::$storage, self::$opt, self::$parts
  */
 function __construct($uid, $folder = null)
 {
     // decode combined UID-folder identifier
     if (preg_match('/^\\d+-.+/', $uid)) {
         list($uid, $folder) = explode('-', $uid, 2);
     }
     $this->uid = $uid;
     $this->app = rcube::get_instance();
     $this->storage = $this->app->get_storage();
     $this->folder = strlen($folder) ? $folder : $this->storage->get_folder();
     $this->storage->set_options(array('all_headers' => true));
     // Set current folder
     $this->storage->set_folder($this->folder);
     $this->headers = $this->storage->get_message($uid);
     if (!$this->headers) {
         return;
     }
     $this->mime = new rcube_mime($this->headers->charset);
     $this->subject = $this->headers->get('subject');
     list(, $this->sender) = each($this->mime->decode_address_list($this->headers->from, 1));
     $this->set_safe(intval($_GET['_safe']) || $_SESSION['safe_messages'][$this->folder . ':' . $uid]);
     $this->opt = array('safe' => $this->is_safe, 'prefer_html' => $this->app->config->get('prefer_html'), 'get_url' => $this->app->url(array('action' => 'get', 'mbox' => $this->storage->get_folder(), 'uid' => $uid)));
     if (!empty($this->headers->structure)) {
         $this->get_mime_numbers($this->headers->structure);
         $this->parse_structure($this->headers->structure);
     } else {
         $this->body = $this->storage->get_body($uid);
     }
     // notify plugins and let them analyze this structured message object
     $this->app->plugins->exec_hook('message_load', array('object' => $this));
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:41,代码来源:rcube_message.php

示例2: list

 /**
  * __construct
  *
  * Provide a uid, and parse message structure.
  *
  * @param string $uid The message UID.
  *
  * @see self::$app, self::$storage, self::$opt, self::$parts
  */
 function __construct($uid)
 {
     $this->uid = $uid;
     $this->app = rcube::get_instance();
     $this->storage = $this->app->get_storage();
     $this->storage->set_options(array('all_headers' => true));
     $this->headers = $this->storage->get_message($uid);
     if (!$this->headers) {
         return;
     }
     $this->mime = new rcube_mime($this->headers->charset);
     $this->subject = $this->mime->decode_mime_string($this->headers->subject);
     list(, $this->sender) = each($this->mime->decode_address_list($this->headers->from, 1));
     $this->set_safe(intval($_GET['_safe']) || $_SESSION['safe_messages'][$uid]);
     $this->opt = array('safe' => $this->is_safe, 'prefer_html' => $this->app->config->get('prefer_html'), 'get_url' => $this->app->url(array('action' => 'get', 'mbox' => $this->storage->get_folder(), 'uid' => $uid)));
     if (!empty($this->headers->structure)) {
         $this->get_mime_numbers($this->headers->structure);
         $this->parse_structure($this->headers->structure);
     } else {
         $this->body = $this->storage->get_body($uid);
     }
     // notify plugins and let them analyze this structured message object
     $this->app->plugins->exec_hook('message_load', array('object' => $this));
 }
开发者ID:npk,项目名称:roundcubemail,代码行数:33,代码来源:rcube_message.php


注:本文中的rcube::get_storage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。