thomascube
2012-05-04 5b04ddd6bc9e0af5f73694371cd3988b1d5be7e8
commit | author | age
0c2596 1 <?php
A 2
3 /*
4  +-----------------------------------------------------------------------+
5  | program/include/rcube_message_part.php                                |
6  |                                                                       |
7  | This file is part of the Roundcube Webmail client                     |
8  | Copyright (C) 2005-2012, The Roundcube Dev Team                       |
9  | Copyright (C) 2011-2012, Kolab Systems AG                             |
10  |                                                                       |
11  | Licensed under the GNU General Public License version 3 or            |
12  | any later version with exceptions for skins & plugins.                |
13  | See the README file for a full license statement.                     |
14  |                                                                       |
15  | PURPOSE:                                                              |
16  |   Class representing a message part                                   |
17  |                                                                       |
18  +-----------------------------------------------------------------------+
19  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
20  | Author: Aleksander Machniak <alec@alec.pl>                            |
21  +-----------------------------------------------------------------------+
22
23  $Id$
24
25 */
26
27
28 /**
29  * Class representing a message part
30  *
31  * @package    Mail
32  * @author     Thomas Bruederli <roundcube@gmail.com>
33  * @author     Aleksander Machniak <alec@alec.pl>
34  * @version    2.0
35  */
36 class rcube_message_part
37 {
38     /**
39      * Part MIME identifier
40      *
41      * @var string
42      */
43     public $mime_id = '';
44
45     /**
46      * Content main type
47      *
48      * @var string
49      */
50     public $ctype_primary = 'text';
51
52     /**
53      * Content subtype
54      *
55      * @var string
56      */
57     public $ctype_secondary = 'plain';
58
59     /**
60      * Complete content type
61      *
62      * @var string
63      */
64     public $mimetype = 'text/plain';
65
66     public $disposition = '';
67     public $filename = '';
68     public $encoding = '8bit';
69     public $charset = '';
70
71     /**
72      * Part size in bytes
73      *
74      * @var int
75      */
76     public $size = 0;
77
78     /**
79      * Part headers
80      *
81      * @var array
82      */
83     public $headers = array();
84
85     public $d_parameters = array();
86     public $ctype_parameters = array();
87
88
89     /**
90      * Clone handler.
91      */
92     function __clone()
93     {
94         if (isset($this->parts)) {
95             foreach ($this->parts as $idx => $part) {
96                 if (is_object($part)) {
97                     $this->parts[$idx] = clone $part;
98                 }
99             }
100         }
101     }
102
103 }