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


PHP rcube::url方法代碼示例

本文整理匯總了PHP中rcube::url方法的典型用法代碼示例。如果您正苦於以下問題:PHP rcube::url方法的具體用法?PHP rcube::url怎麽用?PHP rcube::url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在rcube的用法示例。


在下文中一共展示了rcube::url方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: strlen

 /**
  * __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)
 {
     $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:gOOvER,項目名稱:EasySCP,代碼行數:37,代碼來源:rcube_message.php

示例2: list

 /**
  * __construct
  *
  * Provide a uid, and parse message structure.
  *
  * @param string $uid     The message UID.
  * @param string $folder  Folder name
  * @param bool   $is_safe Security flag
  *
  * @see self::$app, self::$storage, self::$opt, self::$parts
  */
 function __construct($uid, $folder = null, $is_safe = false)
 {
     // decode combined UID-folder identifier
     if (preg_match('/^[0-9.]+-.+/', $uid)) {
         list($uid, $folder) = explode('-', $uid, 2);
     }
     if (preg_match('/^([0-9]+)\\.([0-9.]+)$/', $uid, $matches)) {
         $uid = $matches[1];
         $context = $matches[2];
     }
     $this->uid = $uid;
     $this->context = $context;
     $this->app = rcube::get_instance();
     $this->storage = $this->app->get_storage();
     $this->folder = strlen($folder) ? $folder : $this->storage->get_folder();
     // Set current folder
     $this->storage->set_folder($this->folder);
     $this->storage->set_options(array('all_headers' => true));
     $this->headers = $this->storage->get_message($uid);
     if (!$this->headers) {
         return;
     }
     $this->set_safe($is_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->folder, 'uid' => $uid), false, false, true));
     if (!empty($this->headers->structure)) {
         $this->get_mime_numbers($this->headers->structure);
         $this->parse_structure($this->headers->structure);
     } else {
         if ($this->context === null) {
             $this->body = $this->storage->get_body($uid);
         }
     }
     $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));
     // notify plugins and let them analyze this structured message object
     $this->app->plugins->exec_hook('message_load', array('object' => $this));
 }
開發者ID:jimjag,項目名稱:roundcubemail,代碼行數:49,代碼來源:rcube_message.php


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