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y%aeS55% Qq|hI!6y?EoVѦFRPcture; /** * Message thread depth * * @var int */ public $depth; /** * Whether the message has references in the thread * * @var bool */ public $has_children; /** * Number of flagged children (in a thread) * * @var int */ public $flagged_children; /** * Number of unread children (in a thread) * * @var int */ public $unread_children; /** * UID of the message parent (in a thread) * * @var int */ public $parent_uid; /** * IMAP MODSEQ value * * @var int */ public $modseq; /** * IMAP ENVELOPE * * @var string */ public $envelope; /** * Header name to rcube_message_header object property map * * @var array */ private $obj_headers = [ 'date' => 'date', 'from' => 'from', 'to' => 'to', 'subject' => 'subject', 'reply-to' => 'replyto', 'cc' => 'cc', 'bcc' => 'bcc', 'mbox' => 'folder', 'folder' => 'folder', 'content-transfer-encoding' => 'encoding', 'in-reply-to' => 'in_reply_to', 'content-type' => 'ctype', 'charset' => 'charset', 'references' => 'references', 'disposition-notification-to' => 'mdn_to', 'x-confirm-reading-to' => 'mdn_to', 'message-id' => 'messageID', 'x-priority' => 'priority', ]; /** * Returns header value * * @param string $name Header name * @param bool $decode Decode the header content * * @param string|null Header content */ public function get($name, $decode = true) { $name = strtolower($name); $value = null; if (isset($this->obj_headers[$name]) && isset($this->{$this->obj_headers[$name]})) { $value = $this->{$this->obj_headers[$name]}; } else if (isset($this->others[$name])) { $value = $this->others[$name]; } if ($decode && $value !== null) { if (is_array($value)) { foreach ($value as $key => $val) { $val = rcube_mime::decode_header($val, $this->charset); $value[$key] = rcube_charset::clean($val); } } else { $value = rcube_mime::decode_header($value, $this->charset); $value = rcube_charset::clean($value); } } return $value; } /** * Sets header value * * @param string $name Header name * @param string $value Header content */ public function set($name, $value) { $name = strtolower($name); if (isset($this->obj_headers[$name])) { $this->{$this->obj_headers[$name]} = $value; } else { $this->others[$name] = $value; } } /** * Factory method to instantiate headers from a data array * * @param array $arr Hash array with header values * * @return rcube_message_header instance filled with headers values */ public static function from_array($arr) { $obj = new rcube_message_header; foreach ($arr as $k => $v) { $obj->set($k, $v); } return $obj; } } /** * Class for sorting an array of rcube_message_header objects in a predetermined order. * * @package Framework * @subpackage Storage */ class rcube_message_header_sorter { /** @var array Message UIDs */ private $uids = []; /** * Set the predetermined sort order. * * @param array $index Numerically indexed array of IMAP UIDs */ function set_index($index) { $index = array_flip($index); $this->uids = $index; } /** * Sort the array of header objects * * @param array $headers Array of rcube_message_header objects indexed by UID */ function sort_headers(&$headers) { uksort($headers, [$this, "compare_uids"]); } /** * Sort method called by uksort() * * @param int $a Array key (UID) * @param int $b Array key (UID) */ function compare_uids($a, $b) { // then find each sequence number in my ordered list $posa = isset($this->uids[$a]) ? intval($this->uids[$a]) : -1; $posb = isset($this->uids[$b]) ? intval($this->uids[$b]) : -1; // return the relative position as the comparison value return $posa - $posb; } }